PHP Classes

File: sampleOne.php

Recommend this page to a friend!
  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: 17 years ago
Size: 864 bytes


Class file image Download

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++)
"[$i] FOLDER: ".$mySms->smsMessages[$i]["info"]["folder"]."<br>";
" STATUS: ".$mySms->smsMessages[$i]["info"]["status"]."<br>";
" NUMBER: ".$mySms->smsMessages[$i]["info"]["remotenumber"]."<br><br>";
" MESSAGES: "."<br>";