PHP code example of rooyekhat / igap-php-client

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

    

rooyekhat / igap-php-client example snippets




$loop = React\EventLoop\Factory::create();
$connector = new React\Socket\Connector($loop, [
    'dns' => '8.8.8.8',
    'timeout' => 10
]);

iGap\Api::init($loop, $connector);

$userRegister = new \Proto\UserRegister();
$userRegister->setCountryCode('IR');
$userRegister->setPhoneNumber('912xxxxxxx');

iGap\Api::getInstance()->invoke(
    iGap\Api::ACTION_USER_REGISTER,
    $userRegister
);

$loop->run();
bash
# Install Composer
curl -sS https://getcomposer.org/installer | php
bash
composer