HEX
Server: Apache/2.4.58 (Ubuntu)
System: Linux ip-172-31-18-78 6.17.0-1017-aws #17~24.04.1-Ubuntu SMP Tue May 26 21:09:53 UTC 2026 aarch64
User: ubuntu (1000)
PHP: 8.2.31
Disabled: NONE
Upload Files
File: /var/www/nclive/backend/sendsmsapi.php
<?php
class Sendsms { 
    public function sendMessage($senderId, $mobile, $encodedMessage, $type, $otp){
        $Msgid = '20181604';
        $Msgpwd = '7H99t99V';
        $service_url = 'http://164.52.195.161/API/SendMsg.aspx?uname='.$Msgid.'&pass='.$Msgpwd.'&send='.$senderId.'&dest='.$mobile.'&msg='.$encodedMessage;
        
		$curl = curl_init($service_url);
		curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
		curl_setopt($curl, CURLOPT_TIMEOUT, 20);
		$curl_response = curl_exec($curl);
		// print_r($curl_response);
		if ($curl_response === false) {
			$info = curl_getinfo($curl);
			curl_close($curl);
			die('error occured during curl. Additioanl info: '. var_export($info));
		}
		curl_close($curl);
    }
}

// error_reporting(E_ALL);
// ini_set('display_errors', 'ON');

// $senderId = 'GRAPOS';
// $mobile = '9015264177';
// $otp = rand(1111, 9999);
// $mnt_message = "OTP to approve registration for Naukri Connect is  " . $otp . ". Please do not share this OTP with anyone.\nGraposs Connect";
// $encodedMessage = urlencode($mnt_message);
// $type = 'NORMAL';
// $obj = new Sendsms();
// $var = $obj->sendMessage($senderId, $mobile, $encodedMessage, $type, $otp);
// print_r($var);

?>