Re: spider

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Good call, Ray.   And depending on how much you need to pull, you might also 
include <img> and <iframe> src values.  Also test to make sure there's an 
href value for the <a> tags, they could also be <a name="somename"> without 
an href.

It gets really tricky when you start looking at javascript window.open or 
window.location type link sources.

-TG

----- Original Message -----
From: Ray Hauge <ray.hauge.lists@xxxxxxxxx>
To: tedd <tedd@xxxxxxxxxxxx>
Cc: php-general@xxxxxxxxxxxxx
Date: Fri, 21 Mar 2008 13:45:35 -0500
Subject: Re:  spider

> Have a look at something like this:
> 
> http://simplehtmldom.sourceforge.net/
> 
> I haven't used it, but if it works you should be able to pull up a list 
> of all the <a> tags quite easily through the DOM ala:
> 
> foreach($dom->find('a') as $node)
>        echo $node->href . '<br>';


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux