The principle and code of avoiding domain name link blocked and blocked by wechat

The domain name link is blocked by wechat, that is, it cannot be opened in wechat environment. You need to click the top right corner to select a bro...

The domain name link is blocked by wechat, that is, it cannot be opened in wechat environment. You need to click the top right corner to select a browser to open it.

Domain name link wechat shielding, as the name implies, must not be seen.

The domain name link is blocked by wechat, which is the word indicating that you have stopped visiting the webpage.

What causes the domain name link to be blocked and blocked by wechat? There are many reasons, a large part of which is related to the content of your web page:

  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
    Of course, there is also a part that is reported maliciously by peers due to too many times of sharing or too much competition. How can we avoid domain name links being blocked and blocked by wechat due to the above reasons.
    We can solve this problem by using black technology. First, write code to check whether the domain name is blocked. If it is not blocked, continue to visit. If it is blocked, jump to another domain name. In the middle of the process, you can do 0.2 seconds or faster. In this way, the visitors can't see it with the naked eyes. In this way, the traffic will not be lost because the link can't be opened. This is just one of the automatic switching methods, which needs to be supported by many standby domain names. 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. The following code is shared for your reference:
    You can scan the code directly if necessary.

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

5 November 2019, 12:55 | Views: 6327

Add new comment

For adding a comment, please log in
or create account

0 comments