|
 |
|
สอบถาม FUNCTION SEND SMS หน่อยครับ มันไม่สามารถส่งข้อความได้อ่ะ แก้ให้หน่อยครับ |
|
 |
|
|
 |
 |
|
Code (PHP)
<?
//$AccountID="1234";
$UserID="xx";
$UserPass="xx";
$Phone="xx";
$Text="Test Send Message From sms gateway";
$Sender="NUT";
$result=sendsms($UserID,$UserPass,$Phone,$Text);
echo $result;
//ฟังก์ชั่นสำหรับส่ง sms
function sendsms($UserID,$UserPass,$Phone,$Text){
$url="http://www.thsms.com/api/rest?method=send&username=$UserID&password=$UserPass&from=0000&to=$Phone&message=$Text";
$ch = curl_init();
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_URL, $url);
$result=curl_exec($ch);
return $result;
}
?>
echo curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); =1
echo curl_setopt($ch, CURLOPT_URL, $url); = 1
echo $result=curl_exec($ch); = '' อ่ะครับ
อยากทราบว่าต้องแก้ตรงไหนหรอครับตอนนี้ไม่สามารถส่ง SMS ได้อ่ะครับ
http://moshikub.com/fatal-error-call-to-undefined-function-curl_init-%E0%B8%A7%E0%B8%B4%E0%B8%98%E0%B8%B5%E0%B9%81%E0%B8%81%E0%B9%89%E0%B8%97%E0%B8%B3%E0%B8%87%E0%B9%88%E0%B8%B2%E0%B8%A2%E0%B9%86/ << ผมทำตามวิธีนี้แล้วน่ะครับ
Tag : PHP

|
|
 |
 |
 |
 |
Date :
2012-05-24 09:32:37 |
By :
NUT |
View :
2294 |
Reply :
2 |
|
 |
 |
 |
 |
|
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ลองติดต่อผู้ให้บริการ API ดูครับ 
|
 |
 |
 |
 |
Date :
2012-05-24 17:27:47 |
By :
mr.win |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|

|
Load balance : Server 03
|