farazsms/php
Composer 安装命令:
composer require farazsms/php
包简介
Official client for FarazSMS · IranPayamak (فراز اس ام اس · ایران پیامک) — https://farazsms.com. Send pattern/OTP, bulk SMS, reports, phonebook, and all 63 endpoints.
README 文档
README
FarazSMS · IranPayamak — فراز اس ام اس · ایران پیامک 🌐 farazsms.com · iranpayamak.com
Official PHP client for the FarazSMS / IranPayamak web services — send pattern/OTP, simple & bulk SMS, pull reports, manage your phonebook, and reach all 63 endpoints through a low-level request().
PHP 7.4+ · PSR-4 · throws on API errors.
Install
composer require farazsms/php
Quick start
<?php require "vendor/autoload.php"; use FarazSMS\FarazSMS; use FarazSMS\FarazException; $sms = new FarazSMS("YOUR_API_KEY"); // key from the panel → Web Service / API Key print_r($sms->balance()); // verify the key — free $sms->sendPattern("SJ3FgPrE0C", "09120000000", ["code" => "1234"]); // OTP (instant) $sms->sendSimple("Hello!", ["09120000000", "09130000000"]); // bulk print_r($sms->inbox(1, 20)); // inbound replies try { $sms->sendPattern("BAD", "09120000000", ["code" => "1"]); } catch (FarazException $e) { echo $e->statusCode . " " . $e->getMessage(); }
Recipients use the local format
09120000000(no+98). Default sender line90008361.
Bundled helpers
| Area | Methods |
|---|---|
| Account | balance() · profile() · lines() |
| Send | sendPattern() · sendSimple() · sendVariable() |
| Patterns | createPattern() · patterns() |
| Reports | inbox() · sendRequests() · sendRequestItems() |
| Phonebook | phonebooks() · addContact() |
| Reference | provinces() · numberBanks() |
Anything else (tickets, orders, voice, LBS, …) via request($method, $path, $body).
License
MIT
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-06-18