微信域名拦截查询 如何批量查询我们的域名在微信中是否被拦截

微信的域名检测服务,很多在微信中做推广的朋友在使用,但是随着微信中的域名审核越来越严厉,导致现在很多的域名检测接口有很多特殊问题检测不出来。比如无法访问报红,重定向,非官方网站,复制链接浏览器。那么今天给大家推荐一个可以解决这些问题的最新域名检测接口!希望能够帮助到大家!

API接口查询

1、http://www.qqdwz.cn/ymjc?url_long=http://www.baidu.com 

2、http://www.maoapi.cn/wxymjc?url_long=http://www.baidu.com

接口说明 :

www.baidu.com   换成 需要检测的域名链接就可以了,这里被检测的对象可以是域名,也可以是链接,或者说是带参数的链接也可以的!

注意事项:

① 调用api接口时,只需在URL=后面填写需要压缩生成的长网址即可。

② 接口支持url参数,当url中出现 & 符号时,请用 %26 代替(或者使用url编码格式),否则参数可能会丢失。

③ 填写url时,必须要以http(s)://开头,否则可能会导致检测失败。

在线查询:

1、http://www.qqdwz.cn/ymjc

2、http://www.maoapi.cn/jiance

 

返回说明:

{"status":1,"msg":"域名正常"}
{"status":0,"msg":"域名被封"}

调用代码

PHP调用演示:

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

JAVA调用演示:

public static void main(String path[]) throws Exception {
URL u = new URL("http://www.maoapi.cn/wxymjc?url_long?url_long=http://www.baidu.com");
InputStream in = u.openStream();
ByteArrayOutputStream out = new ByteArrayOutputStream();
try {
byte buf[] = new byte[1024];
int read = 0;
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调用演示:

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

猜你喜欢

转载自www.cnblogs.com/okhaz/p/12419723.html