Recommend this page to a friend! |
Classes of Juan Camacho | PHP SMS Sender | README.md | Download |
|
DownloadSMS LibraryThis is a PHP library for interacting with SMS functionality using Gammu. Table of ContentsInstallationRequirements
$sms = new SMS('/path/to/gammu', '/path/to/config', 'section_name');
$number = '+1234567890'; $message = 'Hello, World!'; $response = ''; $sms->send($number, $message, $response); if ($response) {
} else {
}
$folder = 'inbox'; $start = 1; $stop = 10; $response = ''; $sms->delete($folder, $start, $stop, $response); if ($response) {
} else {
}
$messages = $sms->getMessages(); // Process and display the messages foreach ($messages as $folder => $messageList) {
}
$contacts = $sms->getPhoneBook(); // Process and display the contacts foreach ($contacts as $index => $contact) {
}
|