By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,963 Members | 1,279 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,963 IT Pros & Developers. It's quick & easy.

help with sorting out messages

P: 80
i have random mobile number with text messages, how would i go about only viewing the numbers i want for example 1234


i got this but its not working ??
Expand|Select|Wrap|Line Numbers
  1.  
  2.     $m = new Soap_connect;
  3.     #get the messages 
  4.     $get_msg = $m->peekmessage();
  5.     $number_to_match = '447888445445447817814149';
  6.     foreach($get_msg as $msg){
  7.         preg_match('/^(\d{24})(\d{2}\/\d{2}\/\d{4}) (\d{2}:\d{2}:\d{2})SMS\d(.*)/',$msg,$matches);
  8.         if($msg[0] == $number_to_match)echo $msg[4] . "<br />";
  9.         }
  10.  
  11.  
Feb 28 '12 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.