Jump to content


Photo

Save a web page


  • Please log in to reply
4 replies to this topic

#1 Mateobus

Mateobus
  • Members
  • PipPipPip
  • Advanced Member
  • 95 posts

Posted 11 September 2006 - 09:15 PM

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

#2 HuggieBear

HuggieBear
  • Members
  • PipPipPip
  • Advanced Member
  • 1,899 posts
  • LocationEngland, UK

Posted 11 September 2006 - 11:36 PM

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
Advice to MySQL users: Get phpMyAdmin and test your queries work there first, take half the hassle out of diagnosis, also check the reserved words list.

Links: PHP Docs :: RegEx's :: MySQL :: DevGuru :: w3schools

#3 Mateobus

Mateobus
  • Members
  • PipPipPip
  • Advanced Member
  • 95 posts

Posted 12 September 2006 - 12:09 AM

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

#4 gijew

gijew
  • Members
  • PipPipPip
  • Advanced Member
  • 240 posts
  • LocationCalifornia

Posted 12 September 2006 - 12:13 AM

Try file_get_contents()

http://us2.php.net/m...et-contents.php

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.
I'm considered good looking in some countries

#5 Mateobus

Mateobus
  • Members
  • PipPipPip
  • Advanced Member
  • 95 posts

Posted 12 September 2006 - 12:33 AM

same permission error




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users