Recommend this page to a friend! |
Download .zip |
Info | Documentation | View files (4) | Download .zip | Reputation | Support forum | Blog | Links |
Last Updated | Ratings | Unique User Downloads | Download Rankings | |||||
2023-07-13 (2 months ago) | Not enough user ratings | Total: 66 This week: 1 | All time: 10,242 This week: 102 |
Version | License | PHP version | Categories | |||
php-sms 1.0.0 | MIT/X Consortium ... | 5.6 | PHP 5, Wireless and Mobile |
Description | Author | |
This package can send, receive and delete SMS messages using Gammu. |
This is a PHP library for interacting with SMS functionality using Gammu.
Clone the repository:
git clone https://github.com/your-username/sms-library.git
Install the library dependencies using Composer:
composer install
## Usage
### Initialize the SMS object
use SMS\SMS;
$sms = new SMS('/path/to/gammu', '/path/to/config', 'section_name');
### Send an SMS
$number = '+1234567890'; $message = 'Hello, World!';
$response = ''; $sms->send($number, $message, $response);
if ($response) {
echo "SMS sent successfully!\n";
} else {
echo "Failed to send SMS.\n";
}
### Delete an SMS
$folder = 'inbox'; $start = 1; $stop = 10;
$response = ''; $sms->delete($folder, $start, $stop, $response);
if ($response) {
echo "SMS deleted successfully!\n";
} else {
echo "Failed to delete SMS.\n";
}
### Get SMS Messages
$messages = $sms->getMessages();
// Process and display the messages foreach ($messages as $folder => $messageList) {
foreach ($messageList as $messageId => $message) {
// Process individual message data
}
}
### Get Phonebook Contacts
$contacts = $sms->getPhoneBook();
// Process and display the contacts foreach ($contacts as $index => $contact) {
// Process individual contact data
}
## Features
- Send SMS messages
- Delete SMS messages
- Retrieve SMS messages
- Access phonebook contacts
## Contributing
Contributions are welcome! Here's how you can contribute:
1. Fork the repository.
2. Create a new branch.
3. Make your changes.
4. Test your changes.
5. Submit a pull request.
Files |
File | Role | Description | ||
---|---|---|---|---|
src (1 file) | ||||
composer.json | Data | Auxiliary data | ||
LICENSE | Lic. | License text | ||
README.md | Doc. | Documentation |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
100% |
|
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.