Home Forums EN Repairs Vendors Search Reply To: Vendors Search

Nishit Shan
Participant
Post count: 851

Hello Mark,

This is my code for peerless

public function getPeerlessParams()
{
# id password
$params = array(
‘authentication’ => [
‘customer’ => ‘NanoTelecom’,
‘passCode’ => ‘HGFrtre^$343SD’,
‘userId’ => ‘API@voip.us’,
],
);
return $params;
}

public function checkPeerlessConnection()
{
try {
$fullPathToWsdl = “https://animate.peerlessnetwork.com/api/axis/APIService?wsdl”;
ini_set(‘default_socket_timeout’, 5000);
$client = new SoapClient(
$fullPathToWsdl,
array(
‘trace’ => true,
‘connection_timeout’ => 500000,
‘exceptions’ => true,
‘cache_wsdl’ => WSDL_CACHE_BOTH,
‘keep_alive’ => false,
)
);
$filter_ele = array(
‘filters’ => [
‘quantity’ => 0,
‘category’ => 0,
‘consecutive’ => 1,
‘tnCount’ => ”
]
);

$final_param = $this->getPeerlessParams() + $filter_ele;
$numberArray = $client->searchNumbers($final_param);
$connection[‘peerless’] = true;

$connection[‘totalItemsP’] = $numberArray->return->tnCount;
} catch (Exception $e) {
$connection[‘peerless’] = false;
echo ‘

';
        print_r($e);
        exit;
    }
    print_r(json_encode($connection));
    exit;
}

For Comment  :
I will look on it



Thanks
  • This reply was modified 1 year, 9 months ago by Nishit Shan.