| 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 => 'http://129.9.10.73:8001',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HEADER => true,
CURLOPT_POSTFIELDS =>'<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<LGI>
<OPNAME>solcrm</OPNAME>
<PWD>Abc123@@##</PWD>
</LGI>
</soapenv:Body>
</soapenv:Envelope>',
CURLOPT_HTTPHEADER => array(
'Content-Type: text/plain',
'User-Agent: Jakarta Commons-HttpClient/3.1'
),
));
$response = curl_exec($curl);
$headerlocation = '';
if (strpos($response, 'Location') !== false) {
$arrresponse = explode("Location:", $response);
$arrresponse1 = explode("Server:", $arrresponse[1]);
$headerlocation = $arrresponse1[0];
}
$headerlocation = trim($headerlocation);
$apiurl = $headerlocation;
$crmapirequest = '<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<LST_CBAR>
<ISDN>252644220171</ISDN>
</LST_CBAR>
</soapenv:Body>
</soapenv:Envelope>';
curl_setopt_array($curl, array(
CURLOPT_URL => $apiurl,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_HEADER => false,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS =>$crmapirequest,
CURLOPT_HTTPHEADER => array(
'Content-Type: text/plain',
'User-Agent: Jakarta Commons-HttpClient/3.1'
),
));
$response1 = curl_exec($curl);
$soap = simplexml_load_string($response1);
$arrresponse = $soap->children('http://schemas.xmlsoap.org/soap/envelope/')->Body->children();
$xmlresponse = $arrresponse->LST_CBARResponse->Result;
$resultcode = $xmlresponse->ResultCode;
foreach($xmlresponse->ResultData->Group as $recipient)
{
$gname = $recipient->attributes()->Name;
foreach($recipient as $key => $tmpdata){
/*echo $gname."==".$key."====".$tmpdata[0].'<br>';*/
if($tmpdata[0] != 'PROV'){
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'http://129.9.10.73:8001',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HEADER => true,
CURLOPT_POSTFIELDS =>'<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<LGI>
<OPNAME>solcrm</OPNAME>
<PWD>Abc123@@##</PWD>
</LGI>
</soapenv:Body>
</soapenv:Envelope>',
CURLOPT_HTTPHEADER => array(
'Content-Type: text/plain',
'User-Agent: Jakarta Commons-HttpClient/3.1'
),
));
$response = curl_exec($curl);
$headerlocation = '';
if (strpos($response, 'Location') !== false) {
$arrresponse = explode("Location:", $response);
$arrresponse1 = explode("Server:", $arrresponse[1]);
$headerlocation = $arrresponse1[0];
}
$headerlocation = trim($headerlocation);
$apiurl = $headerlocation;
$crmapirequest = '<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<DEA_'.$gname.'>
<ISDN>252642000003</ISDN>
</DEA_'.$gname.'>
</soapenv:Body>
</soapenv:Envelope>';
curl_setopt_array($curl, array(
CURLOPT_URL => $apiurl,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_HEADER => false,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS =>$crmapirequest,
CURLOPT_HTTPHEADER => array(
'Content-Type: text/plain',
'User-Agent: Jakarta Commons-HttpClient/3.1'
),
));
$response1 = curl_exec($curl);
}
}
}
?>