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 
        }

 

Edited by infoitmanoj
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.