Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Php Laravel Package

signalads/php

PHP client for the SignalAds REST API to send SMS messages. Supports single and bulk sends, pattern-based SMS, and structured error handling via ApiException/HttpException. Install with Composer and authenticate using your API key from the SignalAds panel.

View on GitHub
Deep Wiki
Context7

signalads-PHP

Latest Stable Version Total Downloads

SignalAds RESTful API Document

If you need to future information about API document Please visit RESTful Document

Installation

Use in these ways :

composer require signalads-co/php

or add

"signalads/php": "*"

And run following command to download extension using composer

$ composer update

Usage

  • Required Autoload
require __DIR__ . '/vendor/autoload.php';
  • Exception Handler
try{
	// call SignalAdsApi function
}
catch(\SignalAds\Exceptions\ApiException $e){
	// در صورتی که خروجی وب سرویس 200 نباشد این خطا رخ می دهد
	echo $e->errorMessage();
}
catch(\SignalAds\Exceptions\HttpException $e){
	// در زمانی که مشکلی در برقرای ارتباط با وب سرویس وجود داشته باشد این خطا رخ می دهد
	echo $e->errorMessage();
}
  • Send Single SMS
$api = new \SignalAds\SignalAdsApi( "API Key" );
$sender = "10004346";
$message = "خدمات پیام کوتاه سیگنال";
$receptor = "09123456789";
$api->Send($sender,$receptor,$message);

Sample Output

{
  "data": {
    "message_id": "28561b88-8403-45b8-a114-508abdb9c436",
    "price": 120
  },
  "message": "پیام شما با موفقیت در صف ارسال قرار گرفت",
  "error": {
    "message": null,
    "errors": null
  }
}
  • Send Multiple SMS With Same Text
$api = new \SignalAds\SignalAdsApi( "API Key" );
$sender = "10004346";
$message = "خدمات پیام کوتاه سیگنال";
$receptors = array("09123456789","09367891011");
$api->SendGroup($sender,$receptors,$message);

Sample Output

{
  "data": {
    "message_id": "55800454-fe52-44b3-9c44-43c87d6f29b2",
    "price": 240
  },
  "message": "پیام شما با موفقیت در صف ارسال قرار گرفت",
  "error": {
    "message": null,
    "errors": null
  }
}
  • Send Sms With Pattern
$api = new \SignalAds\SignalAdsApi( "API Key" );
$sender = "10004346";
$pattern_id = "10004346";
$pattern_params = ["param 1", "param 2"];
$receptors = array("09123456789","09367891011");
$api->SendPattern($sender,$pattern_id,$pattern_params,$receptors);

Sample Output

{
  "data": {
    "message_id": "28561b88-8403-45b8-a114-508abdb9c436"
  },
  "message": "پیام شما با موفقیت در صف ارسال قرار گرفت",
  "error": {
    "message": null,
    "errors": null
  }
}
  • Get Message Status
$api = new \SignalAds\SignalAdsApi( "API Key" );
$messageid=123;
$api->Status($messageid);
  • Get Message Status With Filter
$api = new \SignalAds\SignalAdsApi( "API Key" );
$messageid=123;
$limit=10;
$offset=0;
$status=1;
$receptor="09xxxxxxxxx";
$api->Status($messageid, $limit, $offset, $status, $receptor);

Statuses

PENDING = 1
SENDING = 2
BLACKLIST = 3
DELIVERED = 4
NOT_DELIVERED = 5
NOT_SENDING = 6
ERROR = 7

Sample Output

{
  "data": {
    "items": [
      {
        "number": "09xxxxxxxxx",
        "status": 1
      },
      {
        "number": "09xxxxxxxxx",
        "status": 2
      },
      {
        "number": "09xxxxxxxxx",
        "status": 3
      },
      {
        "number": "09xxxxxxxxx",
        "status": 4
      },
      {
        "number": "09xxxxxxxxx",
        "status": 5
      },
      {
        "number": "09xxxxxxxxx",
        "status": 6
      },
      {
        "number": "09xxxxxxxxx",
        "status": 7
      }
    ],
    "count": 7,
    "sum": 0
  },
  "message": null,
  "error": {
    "message": null,
    "errors": null
  }
}
  • Get account credit
$api = new \SignalAds\SignalAdsApi( "API Key" );
$api->GetCredit();

Sample Output

{
  "data": {
    "credit": 12345
  },
  "message": null,
  "error": {
    "message": null,
    "errors": null
  }
}
  • Get Package Price
$api = new \SignalAds\SignalAdsApi( "API Key" );
$api->GetPackagePrice();

Sample Output

{
  "data": {
    "id": 415,
    "gift_charge": "123",
    "price": "123",
    "name": "testsdf",
    "package_prices": [
      {
        "id": 156,
        "english_price": "210",
        "persian_price": "180",
        "operator": {
          "id": 1,
          "title": "همراه اول"
        }
      }
    ]
  },
  "message": null,
  "error": {
    "message": null,
    "errors": null
  }
}
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
codifyo/ts-generator-bundle
andydefer/laravel-cluster
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky
spatie/mailcoach-vapor