My friend gave me free hosting, and I am doing CRON job on his server. But he said, your CRON job is affecting my server. Just stop the output and everything will be fine.
This is my JSON code
$response = file_get_contents("https://api.themoviedb.org/3/movie/".$requestsDone."?api_key=522cec782xxxx6f6d1e0c834a");
if ($response != FALSE) {
$response = json_decode($response, true);
}
So, i removed all echo lines. But, I still get this error echo'ed.
Warning: file_get_contents(https://api.themoviedb.org/3/movie/39740?api_key=522cec78237f49axxxxxxxxxxx6d1e0c834a): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
I am opening Thousands of URL's, and some URL contain this line
{"status_code":34,"status_message":"The resource you requested could not be found."}
Just this line, nothing more.
So, the page is still opening, why it gives that error? How to stop that?
Or just anyway to stop PHP echoing the error on the page (just for this file, not for whole website).