Read another webpage

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Steveo31
Forum Contributor
Posts: 416
Joined: Sun Nov 23, 2003 9:05 pm
Location: San Jose CA

Read another webpage

Post by Steveo31 »

Searched with no results. Even on google 8O

I would like to "synchronize" to another page, meaning I can pull some data off of a remote site (like php.net) and display it on my page. I've had little luck with fread()... it was limited in what it displayed.

Any ideas? Thanks.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

[php_man]curl[/php_man] may be an option.. what kind of trouble have you had with fread()? Are url wrappers turned on?
User avatar
patrikG
DevNet Master
Posts: 4235
Joined: Thu Aug 15, 2002 5:53 am
Location: Sussex, UK

Post by patrikG »

Snoopy can retrieve and even post pretty much anything as well - if I remember correctly, it's a wrapper for Curl.
Steveo31
Forum Contributor
Posts: 416
Joined: Sun Nov 23, 2003 9:05 pm
Location: San Jose CA

Post by Steveo31 »

fread() just wouldn't read the whole page, even if I increased the filesize considerably. I've seen curl and heard of snoopy... maybe I'll take a look into it. Thanks :)
User avatar
launchcode
Forum Contributor
Posts: 401
Joined: Tue May 11, 2004 7:32 pm
Location: UK
Contact:

Post by launchcode »

Snoopy would be my weapon of choice here.. and you don't need curl for it to work (unless you need to get pages via HTTPS).
dave420
Forum Contributor
Posts: 106
Joined: Tue Feb 17, 2004 8:03 am

Post by dave420 »

If you just want to read a remote website, file_get_contents("http://www.google.com/") works remarkably well :)
Post Reply