Jump to content

Archived

This topic is now archived and is closed to further replies.

Mateobus

Save a web page

Recommended Posts

Is there a way to save an outside web page with PHP. For example, http://www.randomsite.com/randomfile.html. And then parse through that file

Share this post


Link to post
Share on other sites
Yes, it's possible and not too difficult, I use it to read share prices from Reuters.

Look at the fopen() function in the PHP manual.

Regards
Rich

Share this post


Link to post
Share on other sites
I can't use the fopen, because i don't have permission because the file isn't on my server.  I get this error:Permission denied

Share this post


Link to post
Share on other sites
Try file_get_contents()

[url=http://us2.php.net/manual/en/function.file-get-contents.php]http://us2.php.net/manual/en/function.file-get-contents.php[/url]

I should note you still need to use fopen to access it.  It's in the manual there but I just thought to add that bit of info.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.