how to detect domain in chinese viewer status

how to detect domain in chinese viewer status
不能写G F W 相关的 怕域名被墙

This code use for check domain in china network status
1. must be upload china servers or web hosting
2. network request must from china send

Test images

< ?php /* view-source: */ //sae_xhprof_start() $url = isset($_GET['url']) ? $_GET['url'] : die('miss url'); $ch = curl_init(); if (!$ch) { die("Couldn't initialize a cURL handle"); } curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)'); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10); curl_setopt($ch, CURLOPT_TIMEOUT, 30); $data = curl_exec($ch); $domain = parse_url($url, PHP_URL_HOST); $ip = gethostbyname($domain); //if(!curl_errno($ch)) { $info = curl_getinfo($ch); $array = array( "status" => "OK",
"domain" => $domain,
"ipaddress" => $ip,
"url" => $info['url'],
"status_code" => $info['http_code'],
"header_size" => $info['header_size'],
"request_size" => $info['request_size'],
"total_time" => $info['total_time'],
"namelookup_time" => $info['namelookup_time'],
"connect_time" => $info['connect_time'],
"pretransfer_time" => $info['pretransfer_time'],
"size_upload" => $info['size_upload'],
"size_download" => $info['size_download'],
"speed_download" => $info['speed_download'],
"speed_upload" => $info['speed_upload'],
"download_content_length" => $info['download_content_length'],
"upload_content_length" => $info['upload_content_length'],
"starttransfer_time" => $info['starttransfer_time'],
"redirect_time" => $info['redirect_time'],
"redirect_url" => $info['redirect_url']
echo json_encode($array);
//echo 'Took ' . $info['total_time'] . ' seconds to send a request to ' . $info['url'];

} else {
echo json_encode(array("status" => "ERROR"));


This testing OK



The status is OK and nslookup ipaddress
and other curl_getinfo value

if test this domain has band in chinese network
so if your check this domain, always 500
this return 500 error not facebook server down or network question
this china firewall has send fake response rest connection

so we test
just check response
if json it’s ok
if 500 this domain has ban in china network

note that this is only for testing purposes
may be canceled at any time
if you need a lot of requests
you must purchase china VPS china host or china dedicated server for testing


您的电子邮箱地址不会被公开。 必填项已用 * 标注