Location: PHPKode > scripts > Gammu > sampleOne.php
<?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>";
	}
?>
Return current item: Gammu