{"id":18907831,"url":"https://github.com/android-sms-gateway/client-php","last_synced_at":"2025-04-15T04:32:07.103Z","repository":{"id":211376245,"uuid":"728965272","full_name":"android-sms-gateway/client-php","owner":"android-sms-gateway","description":"A PHP client library for sending and managing SMS messages via the SMS Gateway for Android™ API.","archived":false,"fork":false,"pushed_at":"2025-03-24T12:51:21.000Z","size":368,"stargazers_count":15,"open_issues_count":1,"forks_count":7,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-28T16:43:43.988Z","etag":null,"topics":["android-sms","api-client","communication","http-client","messaging","php","php-library","php-sdk","psr-18","rest-api","sms","sms-api","sms-gateway"],"latest_commit_sha":null,"homepage":"https://docs.sms-gate.app","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/android-sms-gateway.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-12-08T05:00:40.000Z","updated_at":"2025-03-10T12:52:49.000Z","dependencies_parsed_at":"2023-12-10T13:30:20.252Z","dependency_job_id":"5b55e23d-ee83-4986-8b2e-0521d578b2bc","html_url":"https://github.com/android-sms-gateway/client-php","commit_stats":null,"previous_names":["capcom6/android-sms-gateway-php","android-sms-gateway/client-php"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/android-sms-gateway%2Fclient-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/android-sms-gateway%2Fclient-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/android-sms-gateway%2Fclient-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/android-sms-gateway%2Fclient-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/android-sms-gateway","download_url":"https://codeload.github.com/android-sms-gateway/client-php/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249006549,"owners_count":21197294,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android-sms","api-client","communication","http-client","messaging","php","php-library","php-sdk","psr-18","rest-api","sms","sms-api","sms-gateway"],"created_at":"2024-11-08T09:23:31.361Z","updated_at":"2025-04-15T04:32:05.474Z","avatar_url":"https://github.com/android-sms-gateway.png","language":"PHP","readme":"# SMS Gateway for Android™ PHP API Client\n\nThis is a PHP client library for interfacing with the [SMS Gateway for Android](https://sms.capcom.me) API.\n\n## Requirements\n\n- PHP 7.4 or higher\n- A PSR-18 compatible HTTP client implementation\n\n## Installation\n\nYou can install the package via composer:\n\n```bash\ncomposer require capcom6/android-sms-gateway\n```\n\n## Usage\n\nHere is a simple example of how to send a message using the library:\n\n\n```php\n\u003c?php\n\nrequire 'vendor/autoload.php';\n\nuse AndroidSmsGateway\\Client;\nuse AndroidSmsGateway\\Encryptor;\nuse AndroidSmsGateway\\Domain\\Message;\n\n$login = 'your_login';\n$password = 'your_password';\n\n$client = new Client($login, $password);\n// or\n// $encryptor = new Encryptor('your_passphrase');\n// $client = new Client($login, $password, Client::DEFAULT_URL, $httpClient, $encryptor);\n\n$message = new Message('Your message text here.', ['+1234567890']);\n\ntry {\n    $messageState = $client-\u003eSend($message);\n    echo \"Message sent with ID: \" . $messageState-\u003eID() . PHP_EOL;\n} catch (Exception $e) {\n    echo \"Error sending message: \" . $e-\u003egetMessage() . PHP_EOL;\n    die(1);\n}\n\ntry {\n    $messageState = $client-\u003eGetState($messageState-\u003eID());\n    echo \"Message state: \" . $messageState-\u003eState() . PHP_EOL;\n} catch (Exception $e) {\n    echo \"Error getting message state: \" . $e-\u003egetMessage() . PHP_EOL;\n    die(1);\n}\n```\n\n## Client\n\nThe `Client` is used for sending SMS messages in plain text, but can also be used for sending encrypted messages by providing an `Encryptor`.\n\n### Methods\n\nThe `Client` class has the following methods:\n\n* `Send(Message $message)`: Send a new SMS message.\n* `GetState(string $id)`: Retrieve the state of a previously sent message by its ID.\n\n# Contributing\n\nContributions are welcome! Please submit a pull request or create an issue for anything you'd like to add or change.\n\n# License\n\nThis library is open-sourced software licensed under the [Apache-2.0 license](LICENSE).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandroid-sms-gateway%2Fclient-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandroid-sms-gateway%2Fclient-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandroid-sms-gateway%2Fclient-php/lists"}