Page 1 of 1

getting links from a web page

Posted: Sat Aug 10, 2002 9:26 pm
by rats
I am trying to get all the links from a web page.
anyone got a regular expression or other that will do it.
I am using this but it only gets about half the links

I also want to later sort through the links and get all the image links...
such as 01.jpg

any help is appreciated.

Code: Select all

$contents = Implode("", File($rowї'url']));
        
preg_match_all("/href="?(&#1111;^"' >]+)(.*)(<\/a>)/i", $contents, $arrayoflinks);