Share domain detection micro-channel official api interface (including PHP, JAVA, Python calls the document)

The company's ad traffic is heavy, because micro-channel links the domain name restrictions are very strict, which led the external links domain name or something easily in micro letter Paozhaopaozhe will be blocked, but he blocked you do not I will inform you, which often leads to run a long time and found that the domain name has long been blocked, and company interests loss. Really annoying, but the domain name too much, there is no way to manually check one by one. Later, I found a few do detect micro-letter domain name service providers online. Here to share a nice micro-letter domain name detection interface.

 

Interface Address: http://www.maoapi.cn/wxymjc?url_long=http://www.baidu.com

Description Interface: The above micro-domain channel detector "http://www.baidu.com" replaced to be detected can be used to link interfaces api

Returning to the description:

{ "Status": 1, "msg": "Domain normal"}
{ "Status": 0, "msg": "Domain blocked"}

 

Back case divided into two kinds in total, it represents a return to the domain name in the micro channel is normal. Return 0 on behalf of the domain name was blocked.

Return 0 means that your domain name appeared in the following situations (document call in the end of the text):

1, induce Share

2, non-micro-channel official website

3, pages containing malicious content Fraud

4, has stopped access the page

5. To view the long open your browser by copying

6, the other so the situation!

These types of situations arise, on behalf of your domain name is not not open properly in the micro letter, that is what we said was closed, was blocked!

Our side with this detection interface, and we ourselves have developed an early warning system, that is, all domain names in imitation of a domain name pool, testing the interface from time to time (the time can be customized, we set up a continuous cycle of inquiry ) on their own to detect how these domain names found was closed alarm message will be sent to you!

This domain name automatically check this pool of more appropriate advertising and more friends. The domain pool there in the promotion of our domain, was closed after the discovery, the system will push real-time information to you. This will promote the timely replacement of links, to prevent loss!

They can according to their needs, choose their own way! To ensure their promotion endeavors. Welcome to join my colleagues a lot of advertising exchange exchanges! To exchange experience Ha!

Calling code

PHP call demo:

$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 call demo:

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 calls the demo:

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)


From the article: http://www.maoapi.cn/bzmwh9.html  please indicate the source!

Guess you like

Origin www.cnblogs.com/dddz12/p/12001891.html