The implementation principle of decrypting wechat domain name detection API interface

Posted by evanesq on Thu, 05 Dec 2019 06:57:34 +0100

Recently, I saw many netizens asking wechat domain name interception detection API interface on the Internet. Some want to find a stable and reliable service provider, some want to replace the previous manual detection through the program when they just contact with this business, and some want to understand the principle of wechat domain name detection API interface in detail, of course, most of these people are technicians or happy to study. No matter what your purpose is, as a person who has studied interface service for many years, the principle of this interface is very simple, and the product is basically mature. If you don't want to go deep into the interface industry and just use this tool, it's recommended to purchase services directly, and it may be more necessary to focus on marketing. Monkey data today share a piece of code for your reference. If you don't understand, you can exchange and learn.

 

$url = "http://api.monkeyapi.com";
$params = array(
'appkey' =>'appkey',//Your application APPKEY
'url' =>'www.monkeyapi.com',//Domain name you need to detect
);

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

   

Monkey data focuses on api interface services such as wechat / QQ domain name detection, wechat / QQ domain name anti seal switching, wap jump to wechat, wechat jump to other platforms. If you don't understand, you can contact wx: xcxsf001

Topics: PHP curl