| 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);
//echo $headerlocation;
$apiurl = $headerlocation;
echo $apiurl;
$crmapirequest = '<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<ERA_CFB>
<ISDN>252672000003</ISDN>
</ERA_CFB>
</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->ERA_CFBResponse->Result->ResultCode;
curl_close($curl);
echo "<pre>";
print_r($arrresponse);
/*$crmapirequest = '<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<MOD_TPLOPTGPRS>
<ISDN>252672000003</ISDN>
<PROV>TRUE</PROV>
<TPLID>600</TPLID>
<DELOLD>FALSE</DELOLD>
</MOD_TPLOPTGPRS>
</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->MOD_TPLOPTGPRSResponse->Result->ResultCode;
curl_close($curl);
echo "<pre>";
print_r($arrresponse);*/
/*$crmapirequest = '<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<ADD_TPLSUB>
<HLRSN>2</HLRSN>
<IMSI>637026400149009</IMSI>
<ISDN>252642000898</ISDN>
<TPLID>600</TPLID>
</ADD_TPLSUB>
</soapenv:Body>
</soapenv:Envelope>';
curl_setopt_array($curl, array(
CURLOPT_URL => $apiurl,
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_POSTFIELDS =>$crmapirequest,
CURLOPT_HEADER => false,
CURLOPT_HTTPHEADER => array(
'Content-Type: text/plain',
'User-Agent: Jakarta Commons-HttpClient/3.1'
),
));
$response1 = curl_exec($curl);
//echo $response1;exit;
$soap = simplexml_load_string($response1);
$arrresponse = $soap->children('http://schemas.xmlsoap.org/soap/envelope/')->Body->children();
$xmlresponse = $arrresponse->ADD_TPLSUBResponse->Result->ResultCode;
echo "<pre>";
print_r($arrresponse);
echo $xmlresponse;
curl_close($curl);exit;*/
/*curl_setopt_array($curl, array(
CURLOPT_URL =>$headerlocation,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HEADER => false,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_USERAGENT,'Jakarta Commons-HttpClient/3.1',
CURLOPT_POSTFIELDS =>'<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<LST_SUB>
<ISDN>252642000895</ISDN>
<DETAIL>FALSE</DETAIL>
</LST_SUB>
</soapenv:Body>
</soapenv:Envelope>',
CURLOPT_HTTPHEADER => array(
'Content-Type: text/plain',
'User-Agent: Jakarta Commons-HttpClient/3.1'
),
));
$response1 = curl_exec($curl);
curl_close($curl);
$soap = simplexml_load_string($response1);
$arrresponse = $soap->children('http://schemas.xmlsoap.org/soap/envelope/')->Body->children();
$xmlresponse = $arrresponse->LST_SUBResponse->Result->ResultCode;
echo "<pre>";
print_r($arrresponse);
echo $xmlresponse;
exit;
*/