joined:July 8, 2009
i have created the code to check the status of the url enter by the client which check the status is 200 or not, but i return 200 also whether url does not exist please help.
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_NOBODY, true);
curl_setopt($ch, CURLOPT_FRESH_CONNECT, 1);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 0);
$retcode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
Any help will be appreciated.