{"id":17717907,"url":"https://github.com/ohmydevops/smsir-php","last_synced_at":"2025-05-07T08:32:12.802Z","repository":{"id":43293416,"uuid":"305987675","full_name":"ohmydevops/smsir-php","owner":"ohmydevops","description":"📩 Unofficial sms.ir PHP/Laravel Package.","archived":false,"fork":false,"pushed_at":"2023-02-06T10:26:09.000Z","size":49,"stargazers_count":18,"open_issues_count":0,"forks_count":5,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-12T23:42:50.471Z","etag":null,"topics":["composer","laravel","php","smsir"],"latest_commit_sha":null,"homepage":"https://sms.ir","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/ohmydevops.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":"2020-10-21T10:26:05.000Z","updated_at":"2024-04-19T07:35:41.000Z","dependencies_parsed_at":"2023-02-19T00:45:42.213Z","dependency_job_id":null,"html_url":"https://github.com/ohmydevops/smsir-php","commit_stats":{"total_commits":44,"total_committers":6,"mean_commits":7.333333333333333,"dds":"0.40909090909090906","last_synced_commit":"c59226754863f5f13411e31ec3e295f59d2d4550"},"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ohmydevops%2Fsmsir-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ohmydevops%2Fsmsir-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ohmydevops%2Fsmsir-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ohmydevops%2Fsmsir-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ohmydevops","download_url":"https://codeload.github.com/ohmydevops/smsir-php/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252816520,"owners_count":21808702,"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":["composer","laravel","php","smsir"],"created_at":"2024-10-25T14:32:40.524Z","updated_at":"2025-05-07T08:32:12.779Z","avatar_url":"https://github.com/ohmydevops.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![StyleCI](https://github.styleci.io/repos/305987675/shield?branch=main)](https://github.styleci.io/repos/305987675?branch=main) [![Latest Stable Version](https://poser.pugx.org/amirbagh75/smsir-php/v)](//packagist.org/packages/amirbagh75/smsir-php) [![Total Downloads](https://poser.pugx.org/amirbagh75/smsir-php/downloads)](//packagist.org/packages/amirbagh75/smsir-php) [![License](https://poser.pugx.org/amirbagh75/smsir-php/license)](//packagist.org/packages/amirbagh75/smsir-php)\n## Unofficial PHP Package for sms.ir\n\nInspired by the [official package](https://github.com/IPeCompany/SmsirLaravel). The official package just working in laravel! This package working in every PHP project \n\nPHP Versions Supported: `7.3, 7.4, 8.0, 8.1`   \nLaravel Versions Supported: `8, 9, 10`\n\n### How to install:\n```\ncomposer require amirbagh75/smsir-php\n```\n\n### Example (Pure PHP)\n```php\n\u003c?php\n\nrequire_once __DIR__ . '/../vendor/autoload.php';\n\nuse Amirbagh75\\SMSIR\\SmsIRClient;\n\n$apiKey = getenv('API_KEY');\n$secretKey = getenv('SECRET_KEY');\n$lineNumber = getenv('LINE_NUMBER');\n$timeOut = 3;\n\n$smsir = new SmsIRClient($apiKey, $secretKey, $lineNumber, $timeOut);\n\ntry {\n    $res = $smsir-\u003egetSentMessages(1, 250);\n    print_r($res-\u003emessages);\n    print_r($res-\u003ecountOfAll);\n} catch (Throwable $e) {\n    error_log($e-\u003egetMessage(), 0);\n}\n```\n\n\n### Example (Laravel)\n\nFirst add these environment variables in your .env file:\n\n```\nSMSIR_API_KEY=\"xxxx\"\nSMSIR_SECRET_KEY=\"xxxx\"\nSMSIR_LINE_NUMBER=\"xxxx\"\nSMSIR_HTTP_TIMEOUT=\"10\"\n```\nThen use it like the following example:\n\n```php\n\u003c?php\n\nnamespace App\\Http\\Controllers;\n\nuse Illuminate\\Http\\Request;\n\nclass Example extends Controller\n{\n    /**\n     * Handle the incoming request.\n     *\n     * @param  \\Illuminate\\Http\\Request  $request\n     * @return \\Illuminate\\Http\\Response\n     */\n    public function __invoke(Request $request)\n    {\n        // do something ...\n        try {\n            $res = SMSIR::getSentMessages('1399/06/01', '1399/10/01', 1, 250);\n            dd($res);\n        } catch (\\GuzzleHttp\\Exception\\GuzzleException $e) {\n            Log::error($e-\u003egetMessage());\n        }\n        // do something ...\n    }\n}\n```\n\n\n### Current methods:\n\nResponse models structures are in the `src/Responses` directory\n\n```php\nsmsCredit(): CreditResponse\n\ngetSMSLines(): SMSLinesResponse\n\nsend(array $messages, array $mobileNumbers, $sendDateTime = null): SendResponse\n\nsendVerificationCode(string $code, string $mobileNumber): VerificationCodeResponse\n\nultraFastSend(array $parameters, string $templateId, string $mobileNumber): VerificationCodeResponse\n\ngetSentMessages($fromDate, $toDate, $pageNumber = 1, $perPage = 100): SentMessagesResponse\n\ngetReceivedMessages($fromDate, $toDate, $pageNumber = 1, $perPage = 100): ReceivedMessagesResponse\n```\n\n## Versioning\n\nWe use [Semantic Versioning](http://semver.org/). [See the available versions](https://github.com/amirbagh75/smsir-php/releases).\n\n## Authors\n\n- **[Amirhossein Baghaie](https://github.com/amirbagh75)** - _Maintainer_\n- **[Ariaieboy](https://github.com/ariaieboy)** - _Collaborator_\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fohmydevops%2Fsmsir-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fohmydevops%2Fsmsir-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fohmydevops%2Fsmsir-php/lists"}