-
Notifications
You must be signed in to change notification settings - Fork 0
/
token.php
28 lines (23 loc) · 736 Bytes
/
token.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<?php
try {
$RefreshToken='<TOKEN APPLICAZIONE>';
$client = new SoapClient('https://demo.visitamiapp.com/app_api_web/genApi.asmx?wsdl');
//$client = new SoapClient('https://www.visitamiapp.com/app_api_web/genApi.asmx?wsdl');
$apiauth =array('Token'=>$RefreshToken);
$header = new SoapHeader('http://visitamiapp.com/','FFHeaderApiGen',$apiauth,true);
$client->__setSoapHeaders($header);
$objectresult=$client->APIGEN_TokenRenew();
$strResult=$objectresult->APIGEN_TokenRenewResult;
if ($strResult!='')
{
$objRes=(json_decode($strResult));
print_r($objRes);
}
else
{
echo "ERROR: ".$objectresult->lErr;
}
} catch (Exception $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
}
?>