User Tools

Site Tools


Sidebar

en:objects:smsactivate:functional:get_numbers_status

get_numbers_status

get_numbers_status($country=0, $operator='any'); - get the number of available numbers.

the input Function accepts parameters:

  • $country – number country, 0 - Russia, 1 - Ukraine, 2 - Kazakhstan, 3 - China, 4 - Philippines, 5 - Myanmar, 6 - Indonesia, 7 - Malaysia, 10 - Vietnam, 11 - Kyrgyzstan, 12 - USA, 13 - Israel, 14 - Hong Kong, 15 - Poland, 16 - England, 17 - Madagascar, 18 - Congo, 19 - Nigeria, 20 - Macau, 21 - Egypt, 23 - Ireland, 24 - Cambodia, 25 - Laos, 26 - Haiti, 27 - ivory coast, 28 - Gambia, 29 - Serbia, 30 - Yemen, 31 - South Africa, 32 - Romania, 34 - Estonia, 35 - Azerbaijan, 36 - Canada, 37 - Morocco, 38 - Ghana, 39 - Argentina, 40 - Uzbekistan, 41 - Cameroon, 42 - Chad, 43 - Germany, (optional, if not specified, the default number will be given according to the setting in the left menu).
  • $operator –mobile operator of the number, acceptable values are megafon, mts, beeline, tele2, any (optional, if not specified, the number will be given by default according to the setting in the left menu). Valid ONLY FOR Russian Federation numbers (country=0).

    After testing, the function returns the result of its work to the script :
  • string – a string with the service's response in json format: {"vk_0":179,"ok_0":197,"wa_0":185,"vi_0":72,"tg_0":215,"wb_0":88,"go_0":222,"av_0":21,"av_1":42,"fb_0":239}.
    Where before the dash - the name of the service, after the designation whether to enable forwarding. 0 - do not enable. 1 - enable.
    Possible error:
    BAD_KEY - invalid API key
    ERROR_SQL - SQL server error

    PHP example:

    <?php $xhe_host = "127.0.0.1:7010";
     
    //connect the object to control the emulator, if not already connected
    if(!isset($path))
      $path = "../../../Templates/xweb_human_emulator.php";
    require($path);
     
    //Start
    echo "<hr> <font color = blue> smsactivate->".basename(__FILE__)."</font> <hr>";
     
    //set the service api key
    $smsactivate->api_key = '3161df9b1fe1ccb8cfd7dA91db765de8';
    //get the number of numbers
    //a country
    /* $country - country of the number, 0 - Russia, 1 - Ukraine, 2 - Kazakhstan, 3 - China, 4 - Philippines, 5 - Myanmar, 6 - Indonesia, 7 - Malaysia, 10 - Vietnam, 11 - Kyrgyzstan, 12 - USA, 13 - Israel, 14 - Hong Kong, 15 - Poland, 16 - England, 17 - Madagascar, 18 - Congo, 19 - Nigeria, 20 - Macau, 21 - Egypt, 23 - Ireland, 24 - Cambodia, 25 - Laos, 26 - Haiti, 27 - Cote d'Ivoire, 28 - Gambia, 29 - Serbia, 30 - Yemen, 31 - South Africa, 32 - Romania, 34 - Estonia, 35 - Azerbaijan, 36 - Canada, 37 - Morocco, 38 - Ghana , 39 - Argentina, 40 - Uzbekistan, 41 - Cameroon,(optional, if not specified, the default quantity will be given in accordance with the setting in the left menu).*/
    $country = 0;
    //cellular operator megafon, mts, beeline, tele2, any
    //only for RF
    $operator = 'any';
    echo $smsactivate->get_numbers_status($country, $operator);
     
    //end
    echo "<hr> <br>";
     
    //Quit
    $app->quit();
    ?>

    Python example:

     

    C# example:

     

    Java Script example:

     
  • en/objects/smsactivate/functional/get_numbers_status.txt · Last modified: 2020/10/13 21:47 (external edit)