这样的事情应该工作
$url = 'yoururl'; $ch = curl_init($url); curl_setopt($ch, CURLOPT_NOBODY, true); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); curl_exec($ch); $retpre = curl_getinfo($ch, CURLINFO_HTTP_CODE); curl_close($ch); if (200==$retpre) { // All's well } else { // not so much }
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)