View Single Post
Old 12-15-2009, 10:35 PM  
mkx
Confirmed User
 
Industry Role:
Join Date: Nov 2003
Location: Toronto
Posts: 4,001
Quote:
Originally Posted by Bird View Post
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].")";
      
	  }

}	  
?>
Thanks dude, working with that code now, will update in 10
mkx is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote