Example #1
0
 public function getAvailableRatedDIDSbyCountryCode($country, $VRatingFrom = DIDX_MIN_RATING, $VRatingTo = 10, $limit = -1, $vendors = -1, $ratefrom = -1, $rateto = -1, $CountryID = -1)
 {
     $ret = true;
     $client = new SoapClient(null, array('location' => "https://" . DIDX_SITE . "/cgi-bin/WebGetAllRatedDIDS.cgi", 'trace' => 1, 'connection_timeout' => 5, 'uri' => "http://" . DIDX_SITE . "/GetList"));
     try {
         $ret = $client->getAvailableRatedDIDSbyCountryCode(DIDX_ID, DIDX_PASS, $country, $VRatingFrom, $VRatingTo, $limit, $vendors, $ratefrom, $rateto, $CountryID);
         $ret = $ret['Array'];
         sort($ret);
         for ($i = 1; $i < count($ret); $i++) {
             $ret[$i][1] = $this->setupcost($ret[$i][1]);
             $ret[$i][2] = $this->monthly($ret[$i][2]);
             $ret[$i][3] = $this->minutecharge($ret[$i][3]);
         }
     } catch (SoapFault $exception) {
         $ret = false;
     } catch (Exception $e) {
         $ret = false;
     }
     return $ret;
 }