易语言通用验证码识别服务端,用来做接口还是可以的!
php:
$rel = file_get_contents('http://www.zhuangjiba.com/d/file/help/2018/08/cfdefaddb3f47d78f8c66a7de28720aa.png');
$code = _upload($rel);
echo '验证码:'.$code;
function _upload($post=0){
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'http://127.0.0.1:5658');
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
//curl_setopt($ch, CURLOPT_HTTPHEADER, $httpheader);
if ($post) {
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
}
//curl_setopt($ch, CURLOPT_REFERER, 'http://kfupload.alibaba.com');
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.98 Safari/537.36');
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
$data = curl_exec($ch);
curl_close($ch);
if ($data){
return $data;
}else{
return false;
}
}
此处内容需要评论回复后(审核通过)方可阅读。
版权属于:尹深
本文链接:https://cloud.tencent.com/developer/article/1795081
转载时须注明出处及本声明
(本站部分资源来自互联网收集整理!如有侵权请联系站长删除!!!)
扫码关注腾讯云开发者
领取腾讯云代金券
Copyright © 2013 - 2025 Tencent Cloud. All Rights Reserved. 腾讯云 版权所有
深圳市腾讯计算机系统有限公司 ICP备案/许可证号:粤B2-20090059 深公网安备号 44030502008569
腾讯云计算(北京)有限责任公司 京ICP证150476号 | 京ICP备11018762号 | 京公网安备号11010802020287
Copyright © 2013 - 2025 Tencent Cloud.
All Rights Reserved. 腾讯云 版权所有