Automatic switching code after domain name is blocked by wechat

What's the matter with domain name blocked by wechat? When the following page appears, the domain name has been blocked.

Why is it shielded? Maybe your content is as follows:

  1. Induced sharing content

  2. Induced attention content

  3. H5 game and test content

  4. Fraud content

  5. Illegal business and suspicious services

  6. Rumor content

  7. Harassment information, advertising information and spam information

  8. Information with inconsistent title and vulgar content

  9. Interference with normal use and forced jump content

Maybe your content is completely normal, but now there are many unhealthy products in wechat, which cause your normal products to be killed by mistake. What should we do? In general, nine and a half out of ten will not succeed in applying for unsealing, so we can't watch our efforts drift. We can solve this problem through black technology. First, we can check whether the domain name is blocked by code. If it's not, we can continue to visit. If it's blocked, we can jump to another domain name. In the middle of the process, we can achieve 0.2 seconds or faster In this way, visitors can't see it with their naked eyes. Let me share the code for your reference:

$url = "http://api.monkeyapi.com";
$params = array(
'appkey' =>'appkey',//APPKEY you applied for
'path' =>'/home',//Route to be switched (not required)
);

$paramstring = http_build_query($params);
$content = Curl($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 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));
    curl_close($ch);
    return $response;
}

This is just one of the automatic switching methods, which requires a lot of standby domain names to support. Another way is to pan resolve the domain name to a server, and then generate N multi-level domain names through the domain name to jump. If necessary, you can communicate with me.

Tags: Mobile curl

Posted on Wed, 06 Nov 2019 07:46:26 -0800 by shdt