Login   Register  
PHP Classes
elePHPant
Icontem

File: sampleOne.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Davis Muhajereen D. Dimalen  >  Gammu  >  sampleOne.php  >  Download  
File: sampleOne.php
Role: Example script
Content type: text/plain
Description: First sample using class.gammuWin32
Class: Gammu
Control mobile devices using the tool Gammu
Author: By
Last change: Since I replaced the class, I also have to replace this example to be able to be compatible with the new class. Please see comments on the class to know the reason why the update.
Date: 2006-02-17 14:51
Size: 864 bytes
 

Contents

Class file image Download
<?php

    
include_once('class.gammuWin32.php');      // Make sure the class is in the same directory
    
$gammuPath "d:\gammu\win32\\";        // Path of the gammu software
    
$gammuExecutable "gammu";                // Gammu executable file
    
    
$mySms = new gammuWin32($gammuPath.$gammuExecutable);  // Instantiate gammuWin32
    
    
$mySms->getSMS();      // This will extract all messages from your cellphone together with other information
                        // such as folder, status, number
    
    
for ($i=1;$i<=$mySms->messagesCount;$i++)
    {
        echo 
"[$i]   FOLDER: ".$mySms->smsMessages[$i]["info"]["folder"]."<br>";
        echo 
"       STATUS: ".$mySms->smsMessages[$i]["info"]["status"]."<br>";
        echo 
"       NUMBER: ".$mySms->smsMessages[$i]["info"]["remotenumber"]."<br><br>";
        echo 
"     MESSAGES: "."<br>";
        
print_r($mySms->smsMessages[$i]["message"]);
        echo 
"<br><br><br>";
    }
?>