• 0

downloading website contents


Question

What would be the best way to download the contents of a particular website (IN PHP) and define all the content/html as a variable? I'm currently using fopen / fread right now but there is a problem, the script will stall when its reading a missing file (404).

Is there a more efficient method besides using fopen / read? If not, is it possible to have the script error when there is a 404?

Thanks.

Edited by moss
Link to comment
Share on other sites

4 answers to this question

Recommended Posts

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.