HI
Im collecting some content using file_get_contents from urls and in some cases the file im trying to collect doesnt exist. The script im using is below
$reposurl = file_get_contents('http://eprints.kingston.ac.uk/view/divisions/'.strtolower($group_shortname).'.include');
But when the file doesnt exist, i get the below error.
file_get_contents( http://eprints.kingston.ac.uk/view/d...s/cwlr.include) [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in C:\xampp\htdocs\business\researchgroup.php on line 294
How do i check file exists or run this script so as i do not get the error on my page.
Thanks 
|