PHP code example of siapepfrance / free-mobile-sms-php-client

1. Go to this page and download the library: Download siapepfrance/free-mobile-sms-php-client 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/ */

    

siapepfrance / free-mobile-sms-php-client example snippets


    


Instance = new \SiapepFrance\FreeMobile\Sms\Api\SmsApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$user = "user_example"; // string | User of free mobile account
$pass = "pass_example"; // string | Password of free mobile account
$msg = "msg_example"; // string | Message to send (max length 999 caracters, above it will trigger 400 error)

try {
    $apiInstance->sendmsgPost($user, $pass, $msg);
} catch (Exception $e) {
    echo 'Exception when calling SmsApi->sendmsgPost: ', $e->getMessage(), PHP_EOL;
}