做简单好用的检查链接是否被微信封禁API
扫描上图二维码,点击注册登录,获取账户和密码
方法1:
<?php
$url = "检测链接";
$name = "登录账户";
$pwd = "登录密码";
$status = 0;//0为不保存 1位储存记录
file_get_contents('https://www.lmcjl.com/wechat/api/wxff?name='.$name.'&pwd='.$pwd.'&url='.urlencode($url).'&status='.$status);
?>
方法2:
<?php
function http_post($url,$param,$post_file=false){
$oCurl = curl_init(); if(stripos($url,"https://")!==FALSE){
curl_setopt($oCurl, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($oCurl, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($oCurl, CURLOPT_SSLVERSION, 1); //CURL_SSLVERSION_TLSv1
} if (is_string($param) || $post_file) {
$strPOST = $param;
} else {
$aPOST = array(); foreach($param as $key=>$val){
$aPOST[] = $key."=".urlencode($val);
}
$strPOST = join("&", $aPOST);
}
curl_setopt($oCurl, CURLOPT_URL, $url);
curl_setopt($oCurl, CURLOPT_RETURNTRANSFER, 1 );
curl_setopt($oCurl, CURLOPT_POST,true);
curl_setopt($oCurl, CURLOPT_POSTFIELDS,$strPOST);
$sContent = curl_exec($oCurl);
$aStatus = curl_getinfo($oCurl);
curl_close($oCurl); if(intval($aStatus["http_code"])==200){ return $sContent;
}else{ return false;
}
}
$url = "检测链接";
$name = "登录账户";
$pwd = "登录密码";
$status = 0;//0为不保存 1位储存记录
http_post('https://www.lmcjl.com/wechat/api/wxff?name='.$name.'&pwd='.$pwd.'&url='.urlencode($url).'&status='.$status);?>
方法3:
function http_get($url) {
$oCurl = curl_init(); if (stripos($url, "https://") !== FALSE) {
curl_setopt($oCurl, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($oCurl, CURLOPT_SSL_VERIFYHOST, FALSE);
curl_setopt($oCurl, CURLOPT_SSLVERSION, 1); //CURL_SSLVERSION_TLSv1
}
curl_setopt($oCurl, CURLOPT_URL, $url);
curl_setopt($oCurl, CURLOPT_RETURNTRANSFER, 1);
$sContent = curl_exec($oCurl);
$aStatus = curl_getinfo($oCurl);
curl_close($oCurl); if (intval($aStatus["http_code"]) == 200) { return $sContent;
} else { return false;
}
}
$url = "检测链接";
$name = "登录账户";
$pwd = "登录密码";
$status = 0;//0为不保存 1位储存记录
http_get('https://www.lmcjl.com/wechat/api/wxff?name='.$name.'&pwd='.$pwd.'&url='.urlencode($url).'&status='.$status);
其他用法(可get可post):
只需把参数拼接链接
https://www.lmcjl.com/wechat/api/wxff
通过get或post即可
最终链接:https://www.lmcjl.com/wechat/api/wxff?name=账户&pwd=密码&url=链接&status=状态