Re: Pulling Data From a Page

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

 



On Mon, November 6, 2006 1:59 pm, Phillip Baker wrote:
> Grab the HTML file.

You have correctly identified it as a FILE.

Try looking on the php.net site for FILE functions.

http://php.net/file_get_contents

echo htmlentities(file_get_contents('http://php.net/'));

> Parse it for the values I am looking for.

http://php.net/pcre
http://php.net/preg_match_all

> And then plug it into variables for use on my site.


If you need to login to get to the page you want, you'll probably want
to use curl:
http://php.net/curl

Also check if the data you want is provided by RSS feed instead of
web-scraping.

And the previous post regarding permission is definitely Right.

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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