当前位置: 动力学知识库 > 问答 > 编程问答 >

php - curl error : couldn't connect to host

问题描述:

I am using localhost.So, Here i am getting error like curl error : couldn't connect to host.Can anyone help?Thanks in advance

$postp="http://mainadmin.dove-sms.com/sendsms.jsp?user=username&password=password&mobiles=$mobilenumbers&sms=$message&unicode=1";

$ch = curl_init($postp);

$ret = array(CURLOPT_SSL_VERIFYHOST => 1,

CURLOPT_SSL_VERIFYPEER => false,

CURLOPT_FOLLOWLOCATION => 1,

CURLOPT_VERBOSE => true,

CURLOPT_RETURNTRANSFER => 1);

$ret1 = curl_setopt_array($ch, $ret);

$curlresponse = curl_exec($ch);

if(curl_errno($ch))

echo 'curl error : '. curl_error($ch);

分享给朋友:
您可能感兴趣的文章:
随机阅读: