<?phpfunction is_connected(){ $connected = @fsockopen("www.example.com", 80); //website, port (try 80 or 443) if ($connected){ $is_conn = true; //action when connected fclose($connected); }else{ $is_conn = false; //action in connection failure } return $is_conn;}?>
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)