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?
Question
moss
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 mossLink to comment
Share on other sites
4 answers to this question
Recommended Posts