Re: Extracting urls from HTML
| From: | Monte Ohrt | Date: | Thu, 26 Oct 2000 15:20:42 +0000 |
| Subject: | Re: Extracting urls from HTML | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-22149@lists.php.net to get a copy of this message | ||
Hi Srinivasan,
Try Snoopy, it will do what you are looking for.
Take a look at the fetch_links() feature.
http://snoopy.sourceforge.net
Monte
Srinivasan Ramakrishnan wrote:
>
> Hi,
>
> I need to extract the list of links from a html file.
>
> Ideally I will get them into an associative array where the name part equals
> the text between <a href...> and </a>, and the value part contains the
> actual URL.
>
> I've been looking at the available string functions, and I can't seem to
> find a way. Is there a class or library that does this?
>
> I'm too lazy to figure out how to write a parser for this, atleast what I'm
> trying to do doesn't warrant that kind of effort. I have a pretty large
> bookmark file, and I want to store just the links and names in a text file.
>
> Thanks,
>
> Srini
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
--
Monte Ohrt <monte@ispi.net>
http://www.ispi.net/