{"id":21499546,"url":"https://github.com/andreasnij/an-sms","last_synced_at":"2026-03-11T15:13:02.209Z","repository":{"id":45017493,"uuid":"79156543","full_name":"andreasnij/an-sms","owner":"andreasnij","description":"A PHP SMS library.","archived":false,"fork":false,"pushed_at":"2024-09-10T12:01:36.000Z","size":114,"stargazers_count":9,"open_issues_count":1,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-11-13T02:21:20.346Z","etag":null,"topics":["46elks","cellsynt","nexmo","php","sms","twilio"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/andreasnij.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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,"zenodo":null}},"created_at":"2017-01-16T20:27:26.000Z","updated_at":"2024-11-26T21:12:17.000Z","dependencies_parsed_at":"2025-05-27T00:48:38.786Z","dependency_job_id":null,"html_url":"https://github.com/andreasnij/an-sms","commit_stats":{"total_commits":45,"total_committers":5,"mean_commits":9.0,"dds":0.5777777777777777,"last_synced_commit":"e7265ddeecc3bb71583bedf050510970a2241167"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/andreasnij/an-sms","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreasnij%2Fan-sms","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreasnij%2Fan-sms/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreasnij%2Fan-sms/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreasnij%2Fan-sms/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andreasnij","download_url":"https://codeload.github.com/andreasnij/an-sms/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreasnij%2Fan-sms/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30385347,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-11T14:10:17.325Z","status":"ssl_error","status_checked_at":"2026-03-11T14:09:37.934Z","response_time":84,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["46elks","cellsynt","nexmo","php","sms","twilio"],"created_at":"2024-11-23T17:16:52.430Z","updated_at":"2026-03-11T15:13:02.192Z","avatar_url":"https://github.com/andreasnij.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AnSms - A PHP SMS library\n\n[![Version](http://img.shields.io/packagist/v/andreasnij/an-sms.svg?style=flat-square)](https://packagist.org/packages/andreasnij/an-sms)\n\nAn extendable library for sending and receiving SMS messages. \n\n## Supported SMS gateways\n\n|                                                   | Send SMS | Delivery reports | Receive SMS | Premium SMS |\n|---------------------------------------------------|:--------:|:----------------:|:-----------:|:-----------:|\n| [46elks](https://46elks.com/)                     |    ✔     |       ✔          |      ✔      |             |\n| [Cellsynt](https://www.cellsynt.com)              |    ✔     |       ✔          |      ✔      |      ✔      |\n| [Vonage (formerly Nexmo)](https://www.vonage.com) |    ✔     |       ✔          |      ✔      |             |\n| [Twilio](https://www.twilio.com)                  |    ✔     |       ✔          |      ✔      |             |\n| [Telenor SMS Pro](https://www.smspro.se/)         |    ✔     |       ✔          |             |             |\n\n\nYou can add and use your own gateway. This library enables easy switching between different gateways.\n\n\n## Installation\nAdd the package as a requirement to your `composer.json`:\n```bash\n$ composer require andreasnij/an-sms\n```\n\n\nIf you want to use the **46elks**, **Cellsynt** or **Telenor SMS Pro** gateway you also you need\nimplementations of PSR-7: HTTP message interfaces, PSR-17: HTTP Factories and\nPSR-18: HTTP Client. A popular package for this is Guzzle. You can install it with:\n\n```bash\n$ composer require guzzlehttp/guzzle:^7.0 guzzlehttp/psr7:^2.0\n```\n\nYou may choose to use any other implementations of the PSR interfaces though.\n\n\nIf you want to use the **Twilio** gateway you also need to install the Twilio SDK:\n\n```bash\n$ composer require twilio/sdk\n```\n\nIf you want to use the **Vonage** gateway you also need to install the Vonage client:\n\n```bash\n$ composer require vonage/client-core\n```\n\n## Usage\n```php\nuse AnSms\\{\n    SmsTransceiver,\n    Message\\Message,\n    Message\\PremiumMessage,\n    Gateway\\CellsyntGateway\n};\n\n$gateway = new CellsyntGateway('username', 'password');\n$smsTransceiver = new SmsTransceiver($gateway);\n\n// Send SMS\n$message = Message::create('46700000000', 'Hello world!');\n$smsTransceiver-\u003esendMessage($message);\n\n// Receive SMS\n$receivedMessage = $smsTransceiver-\u003ereceiveMessage($_GET);\n\n// Receive SMS delivery report\n$deliveryReport = $smsTransceiver-\u003ereceiveDeliveryReport($_GET);\n\n// Send Premium SMS\n$premiumMessage = PremiumMessage::createFromIncomingMessage(\n    'Thanks for your payment!', \n    5, \n    $receivedMessage\n);\n$smsTransceiver-\u003esendMessage($premiumMessage);\n```\n\n## Upgrading\n\nPlease see [UPGRADING](UPGRADING.md) for details.\n\n## Author\nAndreas Nilsson (\u003chttps://github.com/andreasnij\u003e)\n\n## License\nThis software is licensed under the MIT license - see the [LICENSE](LICENSE.md) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandreasnij%2Fan-sms","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandreasnij%2Fan-sms","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandreasnij%2Fan-sms/lists"}