PHP code example of rosscuk / ami

1. Go to this page and download the library: Download rosscuk/ami 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/ */

    

rosscuk / ami example snippets


'providers' => [
  \Enniel\Ami\Providers\AmiServiceProvider::class,
]

Artisan::call('ami:listen');

Artisan::call('ami:action', [
    'action'      => <action>,
    '--arguments' => [
        <key> => <value>
        ...
    ]
]);

Artisan::call('ami:dongle:sms', [
    'phone'   => <phone>,
    'message' => <message>,
    'device'  => <device

Artisan::call('ami:dongle:sms', [
    'phone'   => <phone>,
    'message' => <message>,
    'device'  => <device

Artisan::call('ami:dongle:ussd', [
    'device' => <device>,
    'ussd'   => <ussd>,
]);

Artisan::call('ami:cli', [
    'command'     => [command],
    '--autoclose' => true,
]);
sh
php artisan ami:listen
sh
php artisan ami:listen --monitor
sh
php artisan ami:dongle:sms <phone> <message> <device
sh
php artisan ami:dongle:sms <phone> <message> <device
sh
php artisan ami:dongle:ussd <device> <ussd>
sh
php artisan ami:cli [command]
sh
php artisan ami:cli [command] --autoclose
sh
php ./vendor/bin/ami ami:listen --host=127.0.0.1 --port=5038 --username=username --secret=secret --monitor