Now the problem i am having is with the
Expand|Select|Wrap|Line Numbers
- preg_match_all ()
Expand|Select|Wrap|Line Numbers
- preg_match_all( "#href=\"(https?://[&=a-zA-Z0-9-_./]+)\"#si", $html2, $links2 );
BUT will not find url's like this -> "/main/index.html",
So to get around this i figured out the pattern for the second type of url ->
Expand|Select|Wrap|Line Numbers
- preg_match_all( "#href=\"(/[&=a-zA-Z0-9-_./]+)\"#si", $html1, $links1 );
Expand|Select|Wrap|Line Numbers
- preg_match_all( "#href=\"(https?://[&=a-zA-Z0-9-_./]+)\"#si" || "#href=\"(/[&=a-zA-Z0-9-_./]+)\"#si", $html1, $links1);
So any help in figuring out how to get the 2 patterns into a single function would be great! note: that i am pretty bad at understanding how the patterns actually work.
Any help is greatly appreciated in advance, Thanks :D