Re: Static and/or Dynamic site scraping using PHP

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

 



9el wrote:
> On Thu, Apr 30, 2009 at 3:33 AM, 9el <lenin@xxxxxxxxxxxxx> wrote:
>> I just got a project to do on PHP of scraping the body items from
>> static sites or just html sites.
>> Could you experts please suggest me some quick resources?
>>
>> I have to make an WP plugin with the data as well.
> 
> Any expert there yet? Was looking for urgent advices on accomplishing the task.
> 
> Thanks
> 
> Lenin
> 
> www.twitter.com/nine_L

If you're just capturing and using the body, the load with
file_get_contents() and use preg_match() to select the body or
individual tags, etc...  For more control, maybe try this:

$doc = new DOMDocument();
$doc->loadHTMLFile('http://example.com/page.html');

Then use:  http://php.net/manual/book.dom.php

-- 
Thanks!
-Shawn
http://www.spidean.com

-- 
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