View Single Post
Old 12-15-2009, 10:25 PM  
Bird
Confirmed User
 
Bird's Avatar
 
Join Date: Jan 2005
Location: Stockton
Posts: 4,365
Oh, I see. You will get it...this is where we all start with php. You should look at W3schools or tiztag for tutorials.

I wrote something real quick for your AT commands but not sure how exactly it would work for you. But should give you some Idea

Code:
<?php 
$contents = file_get_contents("at.php");
$arrays = explode('+CT:', $contents);
print_r($arrays)."<hr />";
//mysql_query($connect);

	  
foreach($arrays as $value){
$i = 0;
print_r($value)."<hr />";


   for($i=0; $i < count($value); $i++) {
     $new = explode(',',$value);
         echo $new[1]. "|" .$new[2]."|".$new[3]."|".$new[4]."|".$new[5]."<br />";
        //$sql = "INSERT INTO modem2 (CT,STATUS,FROM,TIME,MESSAGE) VALUES (' ',".$new[1].",".$new[2].","$new[3].")";
      
	  }

}	  
?>
__________________
ICQ:268731675

Last edited by Bird; 12-15-2009 at 10:29 PM..
Bird is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote