UnknownSec Bypass
403
:
/
var
/
www
/
zenithentcare
/
stmedicosoftware
/ [
drwxrwxr-x
]
Menu
Upload
Mass depes
Mass delete
Terminal
Info server
About
name :
sendmsg_seletect.php
<?php use Google\Auth\Credentials\ServiceAccountCredentials; use Google\Auth\HttpHandler\HttpHandlerFactory; require_once "config.php"; require 'notifi_vendor/vendor/autoload.php'; $credential = new ServiceAccountCredentials( "https://www.googleapis.com/auth/firebase.messaging", json_decode(file_get_contents("zenith.json"), true) ); $token = $credential->fetchAuthToken(HttpHandlerFactory::build()); $ch = curl_init("https://fcm.googleapis.com/v1/projects/zenithentcare/messages:send"); curl_setopt($ch, CURLOPT_HTTPHEADER, [ 'Content-Type: application/json', 'Authorization: Bearer '.$token['access_token'] ]); $from=$_POST['fromdate']; $to= $_POST['todate']; $consultant=$_POST['consultant']; $message=$_POST['message']; $notifydatetime = date("Y-m-d H:m:s"); $fromdateArray = array(); $fromdateArray=explode('-',$from); $todateArray = array(); $todateArray=explode('-',$to); $fromdateformat = intval($fromdateArray[2])."-".intval($fromdateArray[1])."-".intval($fromdateArray[0]); $todateformat = intval($todateArray[2])."-".intval($todateArray[1])."-".intval($todateArray[0]); $notificationdata = (array)json_decode($_POST['tabledata'],true); // $query="Select follo.id, follo.uhid,follo.visitid, DATE_FORMAT(follo.followupdate,'%d-%m-%Y') as followupdate ,follo.consultantid,follo.name,follo.age,follo.ageinyear,follo.mobileno,follo.gender,regis.token,follo.userid,follo.creationdatetime,follo.isdeleted,follo.modificationdatetime from followuptb as follo,tokenregistertb as regis // where follo.mobileno=regis.mobileno and follo.followupdate between '".$from."' and '".$to."' and follo.consultantid='".$consultant."'"; // $statement = $connect->prepare($query); // $statement->execute(); // $total_data = $statement->rowCount(); // $result = $statement->fetchAll(); $status=false; foreach ($notificationdata as $k=>$v) { if($v["status"]==true) { $query1="insert into notificationdetailstb (mobileno, token, message, consultantid, notifydate, isdeleted) values ('".$v["mobileno"]."', '".$v["token"]."', '".$message."', '".$consultant."', '".$notifydatetime."','0')"; $statement1 = $connect->prepare($query1); $statement1->execute(); $status=$v["status"]; curl_setopt($ch, CURLOPT_POSTFIELDS, '{ "message": { "token": '.json_encode($v["token"]).', "notification": { "title": "Appointment", "body": '.json_encode($message).', "image": "" }, "webpush": { "fcm_options": { "link": "https://google.com" } } } }'); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "post"); $response = curl_exec($ch); //curl_exec($ch); //$flag="1"; //$dataflag["status"]="1"; //curl_close($ch); } } // curl_close($ch); //echo $response; echo json_encode($response); //echo json_encode($flag); ?>
Copyright © 2025 - UnknownSec