Decryption of the latest wechat domain name detection technology

   Whether you are the WeChat public number, or the promotion of the company's products, WeChat can use this channel. But in the use process,
It's hard to avoid the problem that the domain name is blocked by wechat due to the page being reported or some other factors. Once this happens, your own
    Business is often affected
 So how can we detect whether the wechat domain name is blocked? We can open the domain name in wechat if


That means it's sealed. But if there are hundreds or thousands or more domain names to be detected, this method is time-consuming and inefficient.
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.
We use the latest technology of the whole network for monkey data. Protocol detection is used. Protocols are distributed on different servers. Technologies are from Huawei,
Tencent came out with a high stability of 99.999%. Now I will give you some codes for your reference. You can + wx: mkapi002 QQ: 2798913756 if you don't understand

$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;
}

Tags: Mobile network curl

Posted on Mon, 02 Dec 2019 04:49:18 -0500 by areric