Official WeChat domain name detection API interface implementation code

Official WeChat domain name detection API interface implementation code

Application scenarios of WeChat domain name detection API interface:

Since WeChat has strict regulations on the content of external links, it may be judged as violating the content regulations if it is not careful, or maliciously reported and complained by peers.

At this time, we need to use the WeChat domain name detection interface to detect the status of the domain name in real time, and check whether the domain name is blocked by WeChat in real time, so as to prevent problems before they occur and not affect promotion. WeChat domain name interception detection shared below
The api is built using the official WeChat interface, which can detect the security of WeChat domain names in real time, notify in time if there are exceptions, and is very stable, with an accuracy rate of 99.9999%.

Instructions for use

interface address:

Request method:
http get/post

Return format:

Example request:

JSON return example

 {"code": 200,"msg": " ","data": 0} {"code": 200,"msg": " ","data": 1} {"code": 200,"msg": " ","data": 2} {"code": 200,"msg": " ","data": 3 


Code sharing

$url = "";
$params = array(
'appkey' =>'appkey',//APPKEY
'url' =>'',//

$paramstring = http_build_query($params);
$content = Curl($url, $paramstring);
$result = json_decode($content, true);
if($result) {
}else {

    * @param    string $url [ URL ]
    * @param    string $params [ ]
    * @param    int $ipost [ POST ]
    * @return    string
function Curl($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));
    return $response;