PHP Curl on 81 port

二次信任 提交于 2019-11-29 14:37:44
Abid Hussain

Try this

curl_setopt ($ch, CURLOPT_PORT , 81);

Update code:-

see this URL:- php curl problem

$ch = curl_init();
curl_setopt($ch, CURLOPT_VERBOSE, true);
curl_setopt($ch, CURLOPT_URL, 'http://27.4.198.225:81/ncmsl/check.php');
$store = curl_exec ($ch);
echo substr($store, 1);
curl_close ($ch);

Take a look at CURLOPT_PORT in the manual for curl_setopt()

Use this one for specify port,

curl_setopt($ch, CURLOPT_PORT, 81);

Try this:

curl_setopt($ch, CURLOPT_PORT, $_SERVER['SERVER_PORT']);
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!