1. Go to this page and download the library: Download smsfactor/smsfactor-php-sdk library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
smsfactor / smsfactor-php-sdk example snippets
\SMSFactor\SMSFactor::setApiToken('your token');
$response = \SMSFactor\Message::send([
'to' => '33601000000',
'text' => 'Did you ever dance whith the devil in the pale moonlight ?'
]);
print_r($response->getJson());
$response = \SMSFactor\Account::credits();
$response = \SMSFactor\Account::get();
$response = \SMSFactor\Account::subAccounts();
$response = \SMSFactor\Account::create([
'account' => [
"firstname" => "firstname",
"lastname" => "lastname",
"city" => "city",
"phone" => "phone",
"address1" => "address",
"zip" => "zip",
"country_code" => "country code",
"isChild" => 0, //Is the account a subaccount ?
"unlimited" => 0, //If isChild, should the subaccount use the parent's credits
'email' => '[email protected]',
'password' => 'password'
]
]);