Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use the official Wechat domain name to detect the API interface to monitor whether the domain name is blocked in Wechat

2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)05/31 Report--

It is believed that many inexperienced people do not know what to do about how to use the official Wechat domain name to detect the API interface to monitor whether the domain name is blocked in Wechat. Therefore, this article summarizes the causes and solutions of the problem. Through this article, I hope you can solve this problem.

Background

Due to the strict restrictions on Wechat, domain names can easily be judged in several situations:

1. Induce sharing

2. Non-Wechat official website

3. The web page contains malicious fraudulent content

4. Access to the web page has been stopped

5. For browsing, please press the copy browser to open it.

6. Other situations, etc.

After the emergence of this problem, their own business will often be greatly affected. The purpose of using Wechat domain name detection API is to check the status of your domain name, to get the status of your domain name on Wechat in time, and whether the domain name has been blocked by Wechat. It is convenient for yourself to change the promotion domain name in time!

Wechat domain name detection interface sharing

Interface address: http://www.maoapi.cn/wxymjc?url_long=http://www.baidu.com

API description: replace the "http://www.baidu.com"" of the above Wechat domain name detection api interface with the link to be tested to use it.

How Wechat works

Send the domain name to be tested by simulating Wechat to carry out environmental testing.

Domain names have the following states:

1. The domain name can be accessed normally (not blocked by Wechat)

two。 The domain name was intercepted by Wechat

3. Non-Wechat official web page, continued visit will be converted to mobile preview mode

4. According to user complaints and detection by the Tencent Security website Security Center, the web page contains malicious fraudulent content and access has been stopped in order to maintain a green Internet environment.

5. The web page contains induced sharing, attention and other induced behavior, which has been complained by many people. In order to maintain the green Internet environment, access has been stopped.

6. For browsing, please press the copy browser to open it.

7. Other things, etc.

Description: a total of 2 return methods, 1 is normal. 2 is the above situation. All can not be opened properly in Wechat!

Return description:

{"status": 1, "msg": "Domain name normal"} {"status": 0, "msg": "Domain name blocked"} API documentation

Demo of PHP call:

$url = 'http://www.baidu.com';$api_url =' http://www.maoapi.cn/wxymjc?url_long=http://www.baidu.com;$short_url = file_get_contents ($api_url); echo $short_url

Demo of JAVA call:

Public static void main (String path []) throws Exception {URL u = new URL ("http://www.maoapi.cn/wxymjc?url_long=http://www.baidu.com");InputStream in = u.openStream (); ByteArrayOutputStream out = new ByteArrayOutputStream (); try {byte buf [] = new byte [1024]; int read = 0X while (read = in .read (buf)) > 0) {out.write (buf, 0, read);}} finally {if (in! = null) {in .close () }} byte b [] = out.toByteArray (); System.out.println (new String (b, "utf-8"));}

Demo of Python call:

Import urllib, urllib2, syshost = 'http://www.maoapi.cn'path =' / wxymjc?'method = 'GET'querys =' url_long=http%3A%2F%2Fwww.baidu.com'bodys = {} url = host + path +'?'+ querysrequest = urllib2.Request (url) response = urllib2.urlopen (request) content = response.read () if (content): print (content)

Note:

1. When calling the api API, simply replace "http://www.baidu.com"" with the URL that needs to be detected.

2. When entering url, you must start with http (s): / /, otherwise the API may not be called.

Frequently asked questions:

1. The API does not return a result. What is the situation?

Answer: sometimes the data returned by the API will be delayed. If the delay is not returned, the detection will fail, or it may be due to the expiration of the interface!

2. How long is the validity period of the test interface? Is there a limit on the number of times?

Answer: the interface will depend on the frequency of customer calls. Please consult customer service if you need it. No limit on the number of times!

After reading the above, do you know how to use the official Wechat domain name detection API interface to monitor whether the domain name is blocked in Wechat? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report