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

The usage of Wechat domain name blocking detection interface api

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

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

This article analyzes how to use the Wechat domain name blocking detection interface api. The content is detailed and easy to understand. Friends who are interested in the "Wechat domain name blocking detection interface api" can follow the editor's train of thought to read it slowly and deeply. I hope it will be helpful to everyone after reading. Next, follow the editor to learn in depth the knowledge of "Wechat domain name blocking detection interface api".

The Wechat domain name blocking detection API API is the domain name status query API officially announced by Tencent. The request API can query the status information of the domain name in Wechat 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 domain name detection API

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

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

Format 3: http://www.dxcheck.cn/api.php?url=http://www.baidu.com

Real-time detection range

Domain name blocking detection API can detect four kinds of domain name anomalies:

1. Link red: prompt that access to the web page has been stopped

2. Security tips: tips for unofficial web pages

3. Security hint: prompt URL contains too many redirects

4. Intercept prompt: please press the copy link for a long time and use the browser to access it.

Application scenario

As Wechat is relatively strict on the content norms of external links, it may be accidentally judged to be in violation of content norms, or be maliciously reported and complained by peers.

Then it is necessary to use the Wechat domain name detection interface to detect the status of the domain name in real time, so that it can be taken as a precaution and does not affect the promotion. The Wechat domain name blocking and detection api shared above is built using Wechat's official API, which can detect Wechat domain name security in real time. It is very stable and stable with 100% accuracy.

Interface document

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. For example of request, please refer to below!

Request example

1 、 PHP

$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

2 、 Java

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"));}

3 、 Python

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.

This is the end of the usage of Wechat domain name blocking detection interface api. I hope the above content can improve everyone. If you want to learn more knowledge, please pay more attention to the editor's updates. Thank you for following the website!

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