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

Analysis of the usage instructions and request examples of the official api interface for Wechat domain name detection

2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

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

Today, I will talk to you about the usage instructions and request example analysis of the official api API for Wechat domain name detection, which may not be well understood by many people. In order to make you understand better, the editor summarized the following. I hope you can get something from this article.

Wechat domain name detection API and QQ domain name detection API API are both domain name query APIs officially announced by Tencent, through which you can query the status information of domain names in Wechat and QQ in real time. If the status is abnormal, the result indicates that the domain name is blocked; if there is no exception, the result indicates that the domain name is normal.

Wechat (QQ) domain name detection API

Request address 1: http://www.60ht.cn/wxcheck/api.php?url=http://www.baidu.com

Request address 2: http://www.xiaocaoff.cn/api/check.php?url=http://www.baidu.com

Application scenario

As Wechat and QQ strictly examine the content of external links, your web page may accidentally contain sensitive words or illegal content, which may cause your domain name to be blocked by Wechat or QQ butler.

Then if we want to detect the survival status of the domain name in real time, we need to request the domain name detection API to query it in real time. Real-time detection of the status of the domain name, so as to prevent problems and do not affect the promotion. The Wechat (QQ) domain name interception detection api shared above is based on the development of Tencent's official API. It can detect the security of domain names in Wechat or QQ in real time. If there are any anomalies, they will be notified in time. It is very stable with 100% accuracy.

instructions

1. Online use

Replace the "http://www.baidu.com"" in the api interface address with the domain name you need to test (with or without http://), then copy the full interface address to the browser to paste and open it to return the result.

2. Request API

If you find it troublesome to use online, or need real-time query, you need to connect the API to the server program, set the return parameters, and then detect and return the status of the domain name in Wechat in real time.

Interface document

Example of PHP request

$url = 'http://www.baidu.com';$api_url =' http://www.60ht.cn/wxcheck/api.php?url=http://www.baidu.com;$short_url = file_get_contents ($api_url); echo $result_url

Example of Java request

Public static void main (String path []) throws Exception {URL u = new URL ("http://www.60ht.cn/wxcheck/api.php?url=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"));}

Example of Python request

Import urllib, urllib2, syshost = 'http://www.60ht.cn/'path =' / wxcheck/api.php'method = 'GET'querys =' url=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 domain name to be tested.

2. The API API supports parameters in the domain name. When the & symbol appears in the domain name, use% 26 instead (or use url encoding format), otherwise the returned result may be inaccurate.

3. Whether the domain name can start with http (s): / /. If you want to detect a second-level domain name, change url to a second-level domain name. If you detect the primary domain name, you can fill in the primary domain name directly.

Frequently asked questions:

Q: why is the result returned by the interface inconsistent with the actual result?

A: the special string carried in the link is not encoded, so the parameter does not take effect, or it is because the domain name to be tested is in the wrong format.

Q: the interface does not return a result. What is the situation?

A: sometimes there is a delay in the return of data from the API. If the API times out, it will fail, and the value of API will be empty. Or the calling method is incorrect. For more information, please see the example of MSG request above.

Q: does the interface limit the number and frequency of requests?

Answer: the official API has no limit on the number of requests and the frequency of requests, and can be detected in real time.

After reading the above, do you have any further understanding of the instructions and request example analysis of the official api API for Wechat domain name detection? If you want to know more knowledge or related content, please follow the industry information channel, thank you for your support.

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

Internet Technology

Wechat

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

12
Report