我怎样才能将curl转换为urlfetch

时间:2013-11-21 12:20:49

标签: urlfetch

如何将此转换为urlfetch我还没有找到好的文档

$url = "http://www.smscountry.com/SMSCwebservice.asp";
$message = urlencode($message);
$ch = curl_init();
if (!$ch) {die("Couldn't initialize a cURL handle");
}
$ret = curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt($ch, CURLOPT_POSTFIELDS, "User=$user&passwd=$password&mobilenumber=$mobilenumbers&message=$message&sid=$senderid&mtype=$messagetype&DR=$DReports");
$ret = curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$curlresponse = curl_exec($ch); 

0 个答案:

没有答案