UnknownSec Bypass
403
:
/
var
/
www
/
zenithentcare
/
testappnew
/
cpanel
/ [
drwxrwxr-x
]
Menu
Upload
Mass depes
Mass delete
Terminal
Info server
About
name :
sendmsg.php
<?php use Google\Auth\Credentials\ServiceAccountCredentials; use Google\Auth\HttpHandler\HttpHandlerFactory; require_once "../config.php"; require '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']; $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]); $query=" Select follo.id, follo.uhid,follo.visitid, DATE_FORMAT(follo.followupdate,'%d-%m-%Y') as followupdate ,follo.consultantid,regis.name,regis.age,regis.ageinyears,regis.mobileno,regis.gender,regis.tokenno,regis.suhid,regis.tokenno,follo.userid,follo.creationdatetime,follo.isdeleted,follo.modificationdatetime from followuptb as follo,registrationtb as regis where follo.followupdate between '".$from."' and '".$to."' and follo.consultantid='".$consultant."' and regis.tokenno is not null and regis.tokenno!='0' and follo.uhid=regis.uhid"; $statement = $connect->prepare($query); $statement->execute(); $total_data = $statement->rowCount(); $result = $statement->fetchAll(); if($total_data > 0) { foreach($result as $row) { curl_setopt($ch, CURLOPT_POSTFIELDS, '{ "message": { "token": '.json_encode($row["tokenno"]).', "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_close($ch); } echo $response; } ?>
Copyright © 2025 - UnknownSec