Re: Extracting hyperlinks from file
| From: | DL Neil | Date: | Thu, 21 Feb 2002 11:53:25 +0000 |
| Subject: | Re: Extracting hyperlinks from file | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-85709@lists.php.net to get a copy of this message | ||
Ando
> I need to produce an array of all the links(hrefs) in a remote file
> (actually those that refer to files in the same remote server, but thats
>
> another matter).
> I'm pretty new to php, i was thinking of doing it with ereg, something
> like eregi("a href[\"]?=(.*)>", $file, $link);
> but i cannot think of a way to make it walk through the whole string, so
>
> it would find all the links, not just the first one.
> Any ideas?
Almost identical question asked and answered a few hours back: look for the thread "[PHP]
regexp on user
supplied link"
Regards,
=dn