In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article introduces the knowledge of "how PHP, JAVA and Python call Wechat domain name api interface". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
Interface address: http://www.maoapi.cn/wxymjc?url_long=http://www.baidu.com
API description: replace the "http://www.baidu.com"" of the above Wechat domain name detection api interface with the link to be tested to use it.
Return description:
{"status": 1, "msg": "Domain name normal"} {"status": 0, "msg": "Domain name blocked"}
There are two types of returns. If 1 is returned, the domain name is normal on Wechat. If 0 is returned, the domain name is blocked.
Returning 0 indicates that the following situations have occurred in your domain name (the calling document is at the end of the text):
1. Induce sharing
2. Non-Wechat official website
3. The web page contains malicious fraudulent content
4. Access to the web page has been stopped
5. For browsing, please press the copy browser to open it.
6. Other situations, etc.
The occurrence of these situations means that your domain name cannot be opened normally in Wechat, that is, what we are talking about is blocked and blocked!
We have this detection interface on our side, and we have developed a set of early warning system, that is, we imitate all domain names in a domain name pool, and the detection interface at regular intervals (time can be customized. We set up a continuous loop query) to test these domain names ourselves, and will send you an alarm message if you find that it is blocked!
This kind of domain name pool automatic check is more suitable for friends with a lot of advertising business. There is a domain name that we are promoting in the domain name pool. After it is found that it has been blocked, the system will push the information to you in real time. In this way, you can change the promotion link in time and prevent the loss!
You can choose the way that suits you according to your own needs! Make sure everything goes well in your promotion work. Welcome all advertising colleagues to communicate with us! Let's exchange ideas!
Calling code
Demo of PHP call:
$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
Demo of JAVA call:
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 = 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"));}
Demo of Python call:
Import urllib, urllib2, syshost = 'http://www.maoapi.cn'path =' / wxymjc?url_long'method = 'GET'querys =' url_long=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) "how to call api Interface of Wechat Domain name by PHP, JAVA, Python", that's it. Thank you for your reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
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: 279
*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.