ITPub博客

首页 > 移动开发 > 微信开发 > 2020最新的微信官方域名检测API接口(含调用文档)

2020最新的微信官方域名检测API接口(含调用文档)

原创 微信开发 作者:howduoyouh1 时间:2020-02-21 23:55:39 0 删除 编辑

微信分享传播的时候,域名经常被拦截,有的时候我们购买的域名直接就是被拦截的等等,为了避免大家走弯路,今天告诉分享给大家一个我正在使用的的微信域名检测工具

接口地址:

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

接口说明:

把上面的微信域名检测api接口的"http://www.baidu.com"替换成需要检测的链接即可使用!

返回说明:


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

调用代码

PHP调用演示:

$url = 'http://;
$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%2F
bodys = {}
url = host + path + '?' + querys
request = urllib2.Request(url)
response = urllib2.urlopen(request)
content = response.read()
if (content):
print(content)




来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/69963364/viewspace-2676701/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: 没有了~
下一篇: 没有了~
请登录后发表评论 登录
全部评论

注册时间:2020-02-21

  • 博文量
    1
  • 访问量
    149