$contact_number, 'message' => $message); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data)); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $server_output = curl_exec($ch); curl_close($ch); echo $server_output; exit; if (!isset($_GET['number']) && !isset($_GET['message'])) { exit(); } <<<<<<< Updated upstream $send_sms = new SMS(); $MyAPIcode = 'PR-AUTOH172111_IE74I'; $MyPasswd ='me}vfe3j#c'; $number = trim($_GET['number']); $message = trim($_GET['message']); $status = $send_sms->sendSMS($number, $message, $variable); // SEND TEXT ITXTMO echo $status; exit; // echo itexmo($number,$message,$MyAPIcode,$MyPasswd); ======= $MyAPIcode = 'PR-AUTOH172111_IE74I'; $MyPasswd = 'me}vfe3j#c'; $number = trim($_GET['number']); $message = trim($_GET['message']); >>>>>>> Stashed changes echo itexmo($number, $message, $MyAPIcode, $MyPasswd); <<<<<<< Updated upstream // function itexmo($number,$message,$MyAPIcode,$MyPasswd){ // $url = 'https://www.itexmo.com/php_api/api.php'; // $itexmo = array('1' => $number, '2' => $message, '3' => $MyAPIcode, 'passwd' => $MyPasswd ); // $ch = curl_init(); // curl_setopt($ch, CURLOPT_URL,$url); // curl_setopt($ch, CURLOPT_POST, 1); // curl_setopt($ch, CURLOPT_POSTFIELDS,http_build_query($itexmo)); // curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); // $server_output = curl_exec($ch); // curl_close ($ch); // echo $server_output; // } ======= function itexmo($number, $message, $MyAPIcode, $MyPasswd) { $url = 'https://www.itexmo.com/php_api/api.php'; $itexmo = array('1' => $number, '2' => $message, '3' => $MyAPIcode, 'passwd' => $MyPasswd); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($itexmo)); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $server_output = curl_exec($ch); curl_close($ch); >>>>>>> Stashed changes echo $server_output; }