WeChat domain name interception detection protocol

Why do many businesses squeeze their scalp to do WeChat marketing and promotion when the micro-envelope domain name is so strict? Because the efficiency of WeChat marketing and promotion is much higher than that of other social platforms, and the rate of WeChat traffic fission is also higher than that of other social platforms, everyone flocks to WeChat to forward and share.
However, with the influx of major merchants, WeChat’s detection system has become more and more strict. Many people will often encounter this situation. The number of domain names promoted today is just getting better or has not been up, the domain name is Micro envelope. Leading to promotion failure, serious loss of traffic, and greatly reduced user experience.

The following points appear to prove that your domain name was blocked by WeChat
• The link is red: It prompts that access to the web page has been stopped {domain name has been blocked by WeChat}
• The domain name can be accessed normally {not blocked by WeChat}
• Non-WeChat official page, continue to visit It will be converted to other browsing modes on mobile phones.
There are user complaints and the Tencent Security Center has detected that the content of the web page involves malicious fraud. In order to maintain the user experience, access to
WeChat domain name interception detection protocol
WeChat domain names has been stopped. The detection technology is mainly due to the fact that domain names are often blocked by WeChat. What about the closure? For example, various versions of WeChat clients, WeChat official account backend binding domain names, Mini Program backend binding domain names, and so on. Where there is a result, where is the use of the target, you should understand it now! If you don’t understand, you can log in to the official website of MonkeyData for consultation.

namespace ConsoleAPI{
    class Program{
        static void Main(string[] args){
            string url = "http://api.monkeyapi.com";

            var parameters = new Dictionary<string, string>();

            parameters.Add("appkey" , "appkey"); //您申请的APPKEY
            parameters.Add("url" , "www.monkeyapi.com"); //需要查询的网站

            string result = sendPost(url, parameters, "post");

            // 代码中JsonObject类下载地址:http://download.csdn.net/download/gcm3206021155665/7458439
            JsonObject newObj = new JsonObject(result);
            String errorCode = newObj["error_code"].Value;

            if (errorCode == "0")
            {
                Debug.WriteLine("成功");
                Debug.WriteLine(newObj);
            }
            else
            {
                //Debug.WriteLine("请求异常");
                Debug.WriteLine(newObj["error_code"].Value+":"+newObj["reason"].Value);
            }
        }

        /// <summary>
        /// Http (GET/POST)
        /// </summary>
        /// <param name="url">请求URL</param>
        /// <param name="parameters">请求参数</param>
        /// <param name="method">请求方法</param>
        /// <returns>响应内容</returns>
        static string sendPost(string url, IDictionary<string, string> parameters, string method){
            if (method.ToLower() == "post")
                {
                    HttpWebRequest req = null;
                    HttpWebResponse rsp = null;
                    System.IO.Stream reqStream = null;
                try
                {
                    req = (HttpWebRequest)WebRequest.Create(url);
                    req.Method = method;
                    req.KeepAlive = false;
                    req.ProtocolVersion = HttpVersion.Version10;
                    req.Timeout = 60000;
                    req.ContentType = "application/x-www-form-urlencoded;charset=utf-8";
                    byte[] postData = Encoding.UTF8.GetBytes(BuildQuery(parameters, "utf8"));
                    reqStream = req.GetRequestStream();
                    reqStream.Write(postData, 0, postData.Length);
                    rsp = (HttpWebResponse)req.GetResponse();
                    Encoding encoding = Encoding.GetEncoding(rsp.CharacterSet);
                    return GetResponseAsString(rsp, encoding);
                }
                    catch (Exception ex)
                {
                    return ex.Message;
                }
                finally
                {
                    if (reqStream != null) reqStream.Close();
                    if (rsp != null) rsp.Close();
                }
            }

Guess you like

Origin blog.51cto.com/14933171/2546119