In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)05/31 Report--
What is the implementation method and principle of Wechat domain name detection API? for this problem, this article introduces the corresponding analysis and solution in detail, hoping to help more partners who want to solve this problem to find a more simple and feasible method.
The Wechat domain name detection API API is the Wechat domain name status query API published by Tencent, which can query the status of the domain name in Wechat in real time. If the status is abnormal, the result will indicate "domain name is blocked". If there is no exception, the result will indicate "domain name is normal".
Wechat domain name detection API
API 1: http://www.60ht.cn/wxcheck/api.php?url=http://www.baidu.com
Interface 2: http://www.xiaocaoff.cn/api/check.php?url=http://www.baidu.com
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.
Instructions for using the API
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.
Request example
PHP call demo
$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
Java call demo
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"));}
Python call demo
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 answer to the question about the implementation method and principle of Wechat domain name detection API. I hope the above content can be of some help to you. If you still have a lot of doubts to be solved, you can follow the industry information channel for more related knowledge.
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.