| Server IP : 138.197.176.125 / Your IP : 216.73.217.122 Web Server : Apache/2.4.41 (Ubuntu) System : Linux SuiteCRM-8 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 User : root ( 0) PHP Version : 8.3.19 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/soltelcocrm/ |
Upload File : |
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://172.22.22.180:6099/api/login',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_SSL_VERIFYPEER => false,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS =>'{
"schemaVersion": "1.0",
"requestId": "d4245d27-37dc-41f5-ac3b-5ee2fa20c6dd",
"timestamp": 1646197402000,
"channel": "Web",
"systemInfo": {
"systemId": "",
"systemSecret": ""
},
"serviceInfo": {
"requestAttributes": {
"deviceId": "",
"deviceIdType": "",
"locationInformation": {
"locationInfoType": "",
"cellId": "",
"LACId": "",
"MNC": "",
"MCC": "",
"IP": "",
"MAC": "",
"latitude": "",
"longitude": ""
},
"subscriptionId": "",
"username": "crmadmin",
"userType": "DISTRIBUTOR",
"userNature": "ADMIN",
"userPassword": "Crm##43251@",
"currencyCode": "840",
"channelName": "",
"serviceType": ""
},
"serviceCode": "0103",
"serviceName": "CustomerLogin"
}
}',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',
'Cookie: connect.sid=s%3AWEB%3B96539539214%3BhPb80.UfEeAAWxZgcz1PX3LzvOR4Lffm%2BGGG1jer2bbKIiW6w'
),
));
$response = curl_exec($curl);
$arrResponse = json_decode($response,true);
curl_close($curl);
$sessionID = $arrResponse['serviceInfo']['responseAttributes']['sessionId'];
echo $sessionID;
/*echo "<pre>";
print_r($arrResponse);*/
$crmapirequest ='{
"schemaVersion": "1.0",
"requestId": "4fff1477-1802-449f-8e8e-7c50cfa5011c",
"timestamp": 1646197402000,
"channel": "Web",
"systemInfo": {
"systemId": "",
"systemSecret": ""
},
"serviceInfo": {
"requestAttributes": {
"deviceId": "",
"deviceIdType": "",
"locationInformation": {
"locationInfoType": "",
"cellId": "",
"LACId": "",
"MNC": "",
"MCC": "",
"IP": "",
"MAC": "",
"latitude": "",
"longitude": ""
},
"accountId": "1981",
"currencyId": 250,
"customerActivityStartDate": "2022-01-01",
"customerActivityEndDate": "2022-03-01",
"dealerId": 0,
"parentPartnerId": 0,
"sessionId": "'.$sessionID.'",
"userType": "DISTRIBUTOR"
},
"serviceCode": "2112",
"serviceName": "subscriberactivityfilter"
}
}';
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://172.22.22.180:6099/api/agentCashActivity',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_SSL_VERIFYPEER => false,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS =>$crmapirequest,
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',
'Cookie: connect.sid=s%3AWEB%3B6424248214%3Bfhx0w.KfdpoSxuYkBS6ULUNTH1JPB7XagGHxhEtPFswAirWG0'
),
));
$response = curl_exec($curl);
curl_close($curl);
$arrResponse = json_decode($response,true);
$dataresult = $arrResponse['serviceInfo']['responseAttributes']['agentCashActivity'];
echo "<pre>";
print_r($dataresult);