I am using the fsockopen http function in php. It works fine but when the server is down and it cannot connect, it causes a problem.
How can I check if the server where the file I am calling is down or not in order to avoid this problem.
Thanks.
toss it in an if..
if(fsockopen(...)){ process_data($foo); } else{ print "Host unavailable."; }