短信整合得到错误笨

问题描述:

我已经将短信发送代码到我的网站来发送消息到特定user.After整合短信代码,它成功地发送消息,但在客户端服务器显示错误短信整合得到错误笨

Failed : Mobile number value is missing Success: Message id: ************* 

我完全同意这个问题,它不会发生在本地主机上,而是显示在客户端服务器上。

我在这里编辑我的代码: -

$message2 = "Dear " . $this->input->post('patient_name') . ".your appointment (" . $docdata->id . ") with Dr." . $docdata->f_name . " " . $docdata->l_name . " has been confirmed at " . $docdata->location . " ," . date('h:i A', strtotime($this->input->post('appoitment_time'))) . "," . date('d-m-Y', strtotime($this->input->post('appointment_date'))) . ".For any help"; 
    $subject ="MyWebsite"; 
    $content = "Dear " . $this->input->post('name') .",<br />". "your appointment (" . $docdata->id . ") with Dr." . $docdata->f_name . " " . $docdata->l_name . " has been confirmed at "."-<br />". $docdata->location . " ," . date('h:i A', strtotime($this->input->post('appoitment_time'))) . "," . date('d-m-Y', strtotime($this->input->post('appointment_date'))) .".<br />"."For any help"; 

    $user_id = 'Website'; // Your Username 
    $pwd = '**********'; // Your Password 
    $sender_id = 'ABCDE'; // Add 6 char sender id viz: HDFCBK 
    $mobile_num = $this->input->post('phone'); // Mobile Number, You can add comma separated mobile number 
    $email_id = $this->input->post('email'); // Email Address, You can add comma separated email id 
    $this->sendMail($this->input->post('email'), $subject,$content,"[email protected]"); 

    $ch = curl_init(); 
    curl_setopt($ch, CURLOPT_URL, "http://tra.bulksmshyderabad.co.in/websms/sendsms.aspx?userid=" . $user_id . "&password=" . $pwd . "&sender=" . $sender_id . "&mobileno=" . urlencode($mobile_num) . "&msg=" . urlencode($message2)); 
    curl_setopt($ch, CURLOPT_HEADER, 0); 
    $output = curl_exec($ch); 
    curl_close($ch); 

请检查一下..

谁能帮助让this.Where要去错了。 任何帮助将不胜感激。

在此先感谢

+0

哪个库用于发送短信?分享代码和其他详细信息 – Naincy

+0

发布您的代码, – Rahul

+0

没有检查您的代码没有人会告诉您什么是问题 –

我没有我的情况下,现在来测试这一点,但你可以试试下面的代码。

$curl = curl_init(); 
$strMessage = urlencode(" Write Your message here "); 
curl_setopt($curl, CURLOPT_URL, "http://your url with parameters(like $strMessage)"); 
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); 
curl_setopt($curl, CURLOPT_HEADER, 0); 
curl_exec($curl); 
curl_close($curl);