Jump to content

php sms code error:


infoitmanoj

Recommended Posts

I am try to php coding for  registering our products  after confirm sms alert posting in our mobile number ....in using way2 sms mobile site ..it seems some error occured ....

 

 

 

  Message has been sent your email address Logging in ... 

Notice: Undefined offset: 1 in C:\wamp\www\html\class.sms.php on line 126
Sending SMS ... 
Notice: Undefined offset: 1 in C:\wamp\www\html\class.sms.php on line 147
Error encountered :

 

 

class.sms.php :

 

 

preg_match($pattern,$out,$matches);
        $id=trim($matches[1]);     // 126 line
        $this->data['id']=$id;
 
    }
 
    private function send_160by2($number,$msg)
    {
        $msg=urlencode($msg);
        $id=$this->data['id'];
        $out1=$this->curl->post("http://m.160by2.com/SaveCompose.asp?l=1","txt_mobileno=$number&txt_msg=$msg&cmdSend=Send+SMS&TID=&T_MsgId=&Msg=$id");
        //echo $out1;
        $pattern = '/\<table.+?\>(.+)\<\/table/s';
        preg_match($pattern, $out1, $matches);
 
        $out=strip_tags(@$matches[1]);
        if(count($matches)<1)
        {
        $pattern="/\<div.+?background:.+?yellow.+?\>(.+?)\<\/div\>/s";
 
        preg_match($pattern,$out1,$matches);
 
        $out=strip_tags($matches[1]);           // 147 line 
        }

 

Link to comment
https://forums.phpfreaks.com/topic/276971-php-sms-code-error/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.