解密微信域名防封API接口实现防封的技术原理

6次阅读

共计 4403 个字符,预计需要花费 12 分钟才能阅读完成。

     <!-- /\* Font Definitions \*/ @font-face {font-family: 宋体; panose-1:2 1 6 0 3 1 1 1 1 1; mso-font-alt:SimSun; mso-font-charset:134; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:3 680460288 22 0 262145 0;} @font-face {font-family:"Cambria Math"; panose-1:0 0 0 0 0 0 0 0 0 0; mso-font-charset:1; mso-generic-font-family:roman; mso-font-format:other; mso-font-pitch:variable; mso-font-signature:0 0 0 0 0 0;} @font-face {font-family: 微软雅黑; panose-1:2 11 5 3 2 2 4 2 2 4; mso-font-charset:134; mso-generic-font-family:swiss; mso-font-pitch:variable; mso-font-signature:-2147483001 672087122 22 0 262175 0;} @font-face {font-family:Tahoma; panose-1:2 11 6 4 3 5 4 4 2 4; mso-font-charset:0; mso-generic-font-family:swiss; mso-font-pitch:variable; mso-font-signature:-520081665 -1073717157 41 0 66047 0;} @font-face {font-family:Consolas; panose-1:2 11 6 9 2 2 4 3 2 4; mso-font-charset:0; mso-generic-font-family:modern; mso-font-pitch:fixed; mso-font-signature:-520092929 1073806591 9 0 415 0;} @font-face {font-family:"\\@微软雅黑"; panose-1:2 11 5 3 2 2 4 2 2 4; mso-font-charset:134; mso-generic-font-family:swiss; mso-font-pitch:variable; mso-font-signature:-2147483001 672087122 22 0 262175 0;} @font-face {font-family:"\\@宋体"; panose-1:2 1 6 0 3 1 1 1 1 1; mso-font-charset:134; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:3 680460288 22 0 262145 0;} /\* Style Definitions \*/ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-unhide:no; mso-style-qformat:yes; mso-style-parent:""; margin-top:0cm; margin-right:0cm; margin-bottom:10.0pt; margin-left:0cm; mso-pagination:widow-orphan; layout-grid-mode:char; mso-layout-grid-align:none; font-size:11.0pt; font-family:"Tahoma","sans-serif"; mso-fareast-font-family: 微软雅黑; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;} span.hljs-number {mso-style-name:hljs-number; mso-style-unhide:no;} .MsoChpDefault {mso-style-type:export-only; mso-default-props:yes; font-size:11.0pt; mso-ansi-font-size:11.0pt; mso-fareast-font-family: 微软雅黑; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi; mso-font-kerning:0pt;} .MsoPapDefault {mso-style-type:export-only; margin-bottom:10.0pt; line-height:11.0pt;} /\* Page Definitions \*/ @page {mso-page-border-surround-header:no; mso-page-border-surround-footer:no;} @page WordSection1 {size:595.3pt 841.9pt; margin:72.0pt 90.0pt 72.0pt 90.0pt; mso-header-margin:35.4pt; mso-footer-margin:35.4pt; mso-paper-source:0;} div.WordSection1 {page:WordSection1;} /\* List Definitions \*/ @list l0 {mso-list-id:279725072; mso-list-template-ids:-1797495592;} ol {margin-bottom:0cm;} ul {margin-bottom:0cm;} -->   

解密微信域名防封 API 接口实现防封的技术原理

看到大家都想了解微信域名防封 api 接口的原理,今天阿莫之家就解密微信域名防封 API 接口实现原理。

微信域名防封是指通过技术手段来实现预付措施。一切说自己完全可以防封的那都是不可能的。一切说什么免死域名不会死的那也是吹大话。我们要做的是让我们的推广域名寿命更长一点,成本更低一点,效果更好一点。具体的防封方案易云防封总结了两个供大家参考:

第一:微信域名检测 + 微信域名切换

你需要有一个微信域名检测接口,自己开发或是购买都可以。配置好你的接口请求程序,准备 2 套域名 A 和 B。比如说分享出去的域名是 A,这里面 A 被称作是主域名。点开后跳到 B,跳转之前检测一下 B 有没有被封,这里面的 B 就称作是落地域名。通常情况下落地域名 B 需要准备几十甚至上百个,利用域名检测接口可以轻松实现被封自动切换。检测接口这个开发文档能够最快能达到 1 毫秒 / 请求来检测(当然一般也不需要这么快,请求频率越高对服务器的要求越高)。并且出现问题会及时进行通知,进行备用域名跳转,保证落地页始终是可以访问的。

第二:多级矩阵跳转

短网址(分享出去的)→主域名→二级域名→三级域名→四级域名(着陆页)

在这里需要注意的事,着陆页的域名尽可能长一点。比如主域名是”abc.com“。那到着陆页可能要做到”ffv5.0766city.com.wx.qq.abc.com/1.html“。把”1.html“做成动态的,让每一次访问都不一样。为什么要做成动态的呢?因为我们在实践过程中发现,有时候不封域名封链接。但是这种方式还是会要用到第一种检测 + 切换的接口。

下面易云防封分享一段微信域名防封切换的 api 接口文档:

  1. $url = “http://api.monkeyapi.com”;
  2. $params = array(
  3. ‘appkey’ =>’appkey’,_//__您申请的__APPKEY_
  4. ‘url’ =>’www.url.com’,_//__需要查询的网站_
  5. ); <<– 有不懂的加 q 咨询:510124737–>>
  6. $paramstring = http\_build\_query($params);
  7. $content = Curl($url, $paramstring);

10.$result = json\_decode($content, true);

11.if($result) {

  1. var_dump($result);

13.}else {

  1. //__请求异常

15.}

16.

17._/**_

  1. * _请求接口返回内容_
  2. * _@param_ string $url [ 请求的__URL__地址 ]
  3. * _@param_ string $params [__请

求的参数_]_

  1. * _@param_ int $ipost [ 是否采用__POST__形式 ]
  2. * _@return_ string

23._*/_

24.function Curl($url, $params = false, $ispost = 0)

25.{

  1. $httpInfo = array();
  2. $ch = curl_init();

28.

  1. curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
  2. curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 60);
  3. curl_setopt($ch, CURLOPT_TIMEOUT, 60);
  4. curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  5. curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
  6. if ($ispost) {
  7. curl_setopt($ch, CURLOPT_POST, true);
  8. curl_setopt($ch, CURLOPT\_POSTFIELDS, $params);
  9. curl_setopt($ch, CURLOPT\_URL, $url);
  10. }else {
  11. if ($params) {
  12. curl_setopt($ch, CURLOPT\_URL, $url.’?’.$params);
  13. } else {
  14. curl_setopt($ch, CURLOPT\_URL, $url);
  15. }
  16. }

45.

  1. $response = curl\_exec($ch);
  2. if ($response === FALSE) {
  3. //echo “cURL Error: ” . curl_error($ch);
  4. return false;
  5. }

51.

  1. $httpCode = curl\_getinfo($ch, CURLINFO_HTTP_CODE);
  2. $httpInfo = array\_merge($httpInfo, curl_getinfo($ch));
  3. curl_close($ch);
  4. <<– 有不懂的加 q 咨询:510124737–>>

ǿ�I��

正文完
 0