Okay so i'm trying to get this persons IP address who has been threatening me on myspace. I dont know who the person is but i was told if i do the following steps i will be able to get their IP and then find out who they are. How do i create a php file? the rest looks pretty simple
Create a .php file on any server you have read write access to.
Here is what the .PHP file can look like:
Code:
<?php
$filename = 'myspace_iplog.txt';
$ip = $_SERVER['REMOTE_ADDR'];
if (is_writable($filename)) {
if (!$handle = fopen($filename, 'a')) {
exit;
}
if (fwrite($handle, $ip) === FALSE) {
exit;
}
fclose($handle);
}
?>
More info on fwrite can be viewed here: http://us2.php.net/fwrite3. On your myspace page include this html:
Code:
<embed src=yourpage.php width=1 height=1></embed>
- Everytime someone views your page it will record their ip to the file myspace_iplog.txt on your server (this blank text file needs to be created before the script will work)