Mateobus Posted September 11, 2006 Share Posted September 11, 2006 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 Quote Link to comment https://forums.phpfreaks.com/topic/20431-save-a-web-page/ Share on other sites More sharing options...
HuggieBear Posted September 11, 2006 Share Posted September 11, 2006 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.RegardsRich Quote Link to comment https://forums.phpfreaks.com/topic/20431-save-a-web-page/#findComment-90104 Share on other sites More sharing options...
Mateobus Posted September 12, 2006 Author Share Posted September 12, 2006 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 Quote Link to comment https://forums.phpfreaks.com/topic/20431-save-a-web-page/#findComment-90126 Share on other sites More sharing options...
gijew Posted September 12, 2006 Share Posted September 12, 2006 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. Quote Link to comment https://forums.phpfreaks.com/topic/20431-save-a-web-page/#findComment-90127 Share on other sites More sharing options...
Mateobus Posted September 12, 2006 Author Share Posted September 12, 2006 same permission error Quote Link to comment https://forums.phpfreaks.com/topic/20431-save-a-web-page/#findComment-90142 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.