Download the PHP package smmtglux/smm-api without Composer

On this page you can find all versions of the php package smmtglux/smm-api. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package smm-api

smm-api-php

A tiny PHP client for the standard SMM API v2 that social media marketing panels expose. No dependencies, no framework, one class.

Why this exists

The SMM v2 protocol has one property that catches everybody the first time:

Every response is HTTP 200. A failure comes back as a normal JSON body, {"error": "Incorrect order ID"}.

So if ($http === 200) tells you nothing, and a naive integration silently treats {"error": "Invalid API key"} as a successful order. This client turns those into an ApiException and leaves everything else as plain arrays.

It handles the two other places the protocol is easy to get wrong:

API

method does
services() the whole catalogue: id, name, category, rate per 1000, min/max, dripfeed/refill/cancel flags
add($service, $link, $quantity, $extra = []) place an order, returns the id. $extra takes runs and interval for dripfeed
status($order) charge, start_count, status, remains, currency
multiStatus($orders) up to 100 orders in one request, keyed by id
refill($order) / multiRefill($orders) request a refill
refillStatus($id) / multiRefillStatus($ids) how a refill is going
cancel($orders) ask to cancel up to 100 orders
balance() your balance and its currency

Use the batch calls. Panels rate-limit per key — 120 requests a minute on TGLUX — so a hundred status() calls in a loop will start failing where one multiStatus() will not.

Notes worth reading once

cancel() is a request, not a refund. Whether an order can still be cancelled is the upstream provider's decision. A 1 in the response means asked; poll status() for the outcome.

Redirects are disabled on purpose. The API key travels in the POST body, so following a redirect would hand your key to whatever host the redirect points at.

Bring your own HTTP stack if you want to — the fourth constructor argument takes a callable(string $url, array $fields, int $timeout): string, which is also how the test suite runs offline:

Tests

Requirements

PHP 8.1+, ext-curl, ext-json.

Where to get a key

Any panel speaking SMM API v2 works. The default endpoint is TGLUX — a wholesale Telegram services provider (post views, reactions, members, story views, search-ranking placement) whose API this client was written against and tested on; keys are on the API page after signing in, and the full API documentation lists every action and its parameters.

Licence

MIT.


All versions of smm-api with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
ext-curl Version *
ext-json Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package smmtglux/smm-api contains the following files

Loading the files please wait ...