Monkey data teaches you to detect whether wechat domain names are blocked in real time

By the end of 2018, the number of wechat users in China has reached 1.04 billion, and the number of wechat sent per day has reached 38 billion. Wechat has become one of the mobile traffic platforms in China. When you browse the links in wechat, you must have "stopped visiting the web page", which means that the promoted domain name has been blocked by wechat browser.
The reason why the domain name of the website is blocked in wechat:
1. Being reported, if a customer buys fake goods or is cheated, he will be complained;
2. There are sensitive words on the website, such as fishing, false, illegal, pornographic, exaggerating curative effect, etc;
3. Malicious report. Now the network competition is fierce. Once the report is made, the website will be blocked if it is added to the blacklist.

This is a fatal blow to those who specialize in wechat promotion and wechat marketing, so it is very important to know the real-time situation of domain names being sealed. Monkey data specially provides wechat / QQ domain name detection interface for domain name detection, which can query and detect whether the domain name is blocked by wechat / QQ in real time. Monkey data uses the latest technology of the whole network. It uses protocol detection. The protocols are distributed on different servers. The technologies are all from Huawei and Tencent. The stability is as high as 99.999%. Now I will provide you with a wechat domain name detection code for your reference. If you don't understand, you can contact wx: mkapi002 QQ: 2798913756

$url = "http://api.monkeyapi.com";
$params = array(
'appkey' =>'appkey',//APPKEY you applied for
'url' =>'www.monkeyapi.com',//Websites to query
);

$paramstring = http_build_query($params);
$content = monkeyCurl($url, $paramstring);
$result = json_decode($content, true);
if($result) {
    var_dump($result);
}else {
    //Request exception
}

/**
    * Request interface return content
    * @param    string $url [Requested URL address]
    * @param    string $params [Requested parameters]
    * @param    int $ipost [POST or not]
    * @return    string
*/
function monkeyCurl($url, $params = false, $ispost = 0)
{
    $httpInfo = array();
    $ch = curl_init();

    curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
    curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 60);
    curl_setopt($ch, CURLOPT_TIMEOUT, 60);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
    if ($ispost) {
        curl_setopt($ch, CURLOPT_POST, true);
        curl_setopt($ch, CURLOPT_POSTFIELDS, $params);
        curl_setopt($ch, CURLOPT_URL, $url);
    }else {
        if ($params) {
            curl_setopt($ch, CURLOPT_URL, $url.'?'.$params);
        } else {
            curl_setopt($ch, CURLOPT_URL, $url);
        }
    }

    $response = curl_exec($ch);
        if ($response === FALSE) {
        //echo "cURL Error: " . curl_error($ch);
        return false;
    }

    $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
    $httpInfo = array_merge($httpInfo, curl_getinfo($ch));
    curl_close($ch);
    return $response;
}

Keywords: PHP network Mobile curl

Added by umbra on Tue, 03 Dec 2019 03:03:49 +0200