PHP code example of mhndev / saman-travel

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

    

mhndev / saman-travel example snippets


 $azki_travisa = new SamanTravelSoapClient('****', '****');

 $countries = $azki_travisa->getCountries();

 stdClass Object
     (
         [getCountriesResult] => stdClass Object
         (
             [TISCountryInfo] => Array
             (
                 [0] => stdClass Object
                 (
                     [errorCode] => -1
                     [errorText] =>
                     [code] => 2
                     [title] => ‏آلمان‏
                     [zoneCode] => -1
                     [standardCode] => DE
                 )
                 [1] => stdClass Object
                 (
                     [errorCode] => -1
                     [errorText] =>
                     [code] => 3
                     [title] => ‏انگلستان‏
                     [zoneCode] => -1
                     [standardCode] => UK
                 )
                 [2] => stdClass Object
                 (
                     [errorCode] => -1
                     [errorText] =>
                     [code] => 4
                     [title] => ‏ايتاليا‏
                     [zoneCode] => -1
                     [standardCode] => IT
                 )
             )
         )
     )