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

What is the usage of Wechat domain name blocking detection interface API

2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly explains "what is the use of Wechat domain name blocking detection interface API". The content of the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "what is the use 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.

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. The object being detected here can be a domain name or a link.

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. 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. It can detect Wechat domain name security in real time. It is very stable and stable with an accuracy of 99.9999%.

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

Example of PHP request

$url = "http://api.monkeyapi.com";

$params = array (

'appkey' = >' appkey',// the APPKEY you applied for

'url' = >' the website that www.monkeyapi.com',// needs to query

);

$paramstring = http_build_query ($params)

$content = Curl ($url, $paramstring)

$result = json_decode ($content, true)

If ($result) {

Var_dump ($result)

} else {

/ / request exception

}

/ * *

* request the returned content of the API

* @ param string $url [requested URL address]

* @ param string $params [requested parameters]

* @ param int $ipost [whether to use POST format]

* @ return string

, /

Function Curl ($url, $params = false, $ispost = 0)

{

$httpInfo = array ()

$ch = curl_init ()

Curl_setopt ($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1)

Curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, 60)

Curl_setopt ($ch, CURLOPT_TIMEOUT, 60)

Curl_setopt ($ch, CURLOPT_RETURNTRANSFER, true)

Curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, true)

If ($ispost) {

Curl_setopt ($ch, CURLOPT_POST, true)

Curl_setopt ($ch, CURLOPT_POSTFIELDS, $params)

Curl_setopt ($ch, CURLOPT_URL, $url)

} else {

If ($params) {

Curl_setopt ($ch, CURLOPT_URL, $url.'?'.$params)

} else {

Curl_setopt ($ch, CURLOPT_URL, $url)

}

}

$response = curl_exec ($ch)

If ($response = FALSE) {

/ / echo "cURL Error:" Curl_error ($ch)

Return false

}

$httpCode = curl_getinfo ($ch, CURLINFO_HTTP_CODE)

$httpInfo = array_merge ($httpInfo, curl_getinfo ($ch))

Curl_close ($ch)

Return $response

}

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. Is the domain name http (s) at the beginning? if you want to test the second-level domain name, change the url to the second-level domain name. If you detect the primary domain name, you can fill in the primary domain name directly.

Frequently asked questions:

1. What amount of request?

A: the user requests the interface address once through the program (that is, to detect the blocked status of a domain name), and the process in which the API returns a result is called a request, and the number of times the domain name status needs to be checked is called the number of requests.

2. What does the frequency of requests mean?

A: the request frequency is the time it takes to wait for the second domain name to be requested after the first domain name status is checked. For example, the frequency is 2 seconds, that is, the interval between two requests must be 2 seconds. It is recommended that users use unlimited frequency API for real-time cyclic request detection when there are a large number of domain names.

3. Can the detection interface be requested in batches?

A: the api API for domain name detection supports batch real-time detection, which allows users to cycle through scheduled scripts for real-time batch detection.

Thank you for your reading. the above is the content of "what is the use of Wechat domain name blocking detection API API". After the study of this article, I believe you have a deeper understanding of the use of Wechat domain name blocking detection API API, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

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

Development

Wechat

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

12
Report