| Server IP : 103.234.187.230 / Your IP : 216.73.216.216 Web Server : Apache System : Linux lserver42043-ind.megavelocity.net 3.10.0-1160.108.1.el7.x86_64 #1 SMP Thu Jan 25 16:17:31 UTC 2024 x86_64 User : apache ( 48) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/html/callcenter.hellogtx.com/ |
Upload File : |
<?php
include_once 'vendor/autoload.php';
function sendInfoWithOutSSL($data, $url) {
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_POST, 1);
if (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off') {
curl_setopt($ch, CURLOPT_PORT, 443);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
}
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$output = curl_exec($ch);
curl_close($ch);
return $output;
}
$insertArray["extension"] = 9811192312;
$data['mobile'] = 9015562063;
$data['SequiryKey'] = '7A739273-D037-4386-9B23-BCD6A4B1ED8B';
$data['AgencySysId'] = 21;
$urlTest = "https://globaltravelexchange.com/gtxwebservices/customerapi/checkandgetcustomerdetailwithsequirykey";
if (strlen($data['mobile']) > 9) {
$returnRequest = sendInfoWithOutSSL($data, $urlTest);
$returnArray = json_decode($returnRequest, true);
$IsCustomer = false;
$CustomerName = '';
$MobileNumber = substr(trim($data['mobile']), -10);
$CustomerId = '';
if (isset($returnArray['status']) && $returnArray['status'] == true) {
$IsCustomer = true;
$IsApi = "second";
$CustomerName = trim($returnArray['FirstName']) . ' ' . trim($returnArray['LastName']);
$CustomerId = trim($returnArray['Contacts']);
}
}
$post = array('IsApi' =>$IsApi ,'IsCustomer' => $IsCustomer, "CustomerName" => $CustomerName, "MobileNumber" => $MobileNumber, "CustomerId" => $CustomerId, "extension" => $insertArray["extension"], "AgencySysId" => $data['AgencySysId']);
$options = array(
'cluster' => 'ap2',
'useTLS' => true
);
$pusher = new Pusher\Pusher(
'99f31b09bc0705e7c87b',
'974a4dc79271f28a169b',
'1050818',
$options
);
$pusher->trigger('my-channel', 'my-event', $post);
?>