infoitmanoj Posted April 15, 2013 Share Posted April 15, 2013 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 126Sending SMS ... Notice: Undefined offset: 1 in C:\wamp\www\html\class.sms.php on line 147Error 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.