
Originally Posted by
David Witherspoon
PHP Code:
<?php
header('Content-type: image/gif');
readfile('img.jpg');
$filename = "logged.txt";
$somecontent = "Connection from:".$_SERVER['REMOTE_ADDR']." at ".date("r",time())."\n";
if ($handle = fopen($filename, 'a')) {
fwrite($handle, $somecontent)
fclose($handle);
}
?>
Can I ask why you were logging (poorly) the address of everyone that read page two?
You could have gotten the same info with a simple embedded image, which then would have showed up in your apache logs with an IP that you could have then run hostname lookups on. Oh, and if the content type is image/gif, then don't try to feed the browser a jpg.
Also, way to keep your Sandbox directory wide open, AND to leave your phpinfo in there. 
Code:
Variable Value
_REQUEST["RMID"] 180afb4d43f91f10
_REQUEST["RMFD"] 011FB06hO104pWs
_COOKIE["RMID"] 180afb4d43f91f10
_COOKIE["RMFD"] 011FB06hO104pWs
_SERVER["DOCUMENT_ROOT"] /Library/WebServer/Documents
_SERVER["HTTP_ACCEPT"] image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*
_SERVER["HTTP_ACCEPT_ENCODING"] gzip, deflate
_SERVER["HTTP_ACCEPT_LANGUAGE"] en-us
_SERVER["HTTP_CONNECTION"] Keep-Alive
_SERVER["HTTP_COOKIE"] RMID=180afb4d43f91f10; RMFD=011FB06hO104pWs
_SERVER["HTTP_HOST"] c-67-172-227-181.hsd1.ut.comcast.net
_SERVER["HTTP_REFERER"] http://c-67-172-227-181.hsd1.ut.comcast.net/~Sandbox/
_SERVER["HTTP_USER_AGENT"] Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727)
_SERVER["PATH"] /usr/bin:/bin:/usr/sbin:/sbin:/Users/Sandbox
_SERVER["REMOTE_ADDR"] 24.10.251.77
_SERVER["REMOTE_PORT"] 4949
_SERVER["SCRIPT_FILENAME"] /Users/Sandbox/Sites/test.php
_SERVER["SCRIPT_URI"] http://c-67-172-227-181.hsd1.ut.comc...ndbox/test.php
_SERVER["SCRIPT_URL"] /~Sandbox/test.php
_SERVER["SERVER_ADDR"] 67.172.227.181
_SERVER["SERVER_ADMIN"] [no address given]
_SERVER["SERVER_NAME"] c-67-172-227-181.hsd1.ut.comcast.net
_SERVER["SERVER_PORT"] 80
_SERVER["SERVER_SIGNATURE"] <ADDRESS>Apache/1.3.33 Server at c-67-172-227-181.hsd1.ut.comcast.net Port 80</ADDRESS>
_SERVER["SERVER_SOFTWARE"] Apache/1.3.33 (Darwin) PHP/5.1.6
_SERVER["GATEWAY_INTERFACE"] CGI/1.1
_SERVER["SERVER_PROTOCOL"] HTTP/1.1
_SERVER["REQUEST_METHOD"] GET
_SERVER["QUERY_STRING"] no value
_SERVER["REQUEST_URI"] /~Sandbox/test.php
_SERVER["SCRIPT_NAME"] /~Sandbox/test.php
_SERVER["PATH_TRANSLATED"] /Users/Sandbox/Sites/test.php
_SERVER["PHP_SELF"] /~Sandbox/test.php
_SERVER["REQUEST_TIME"] 1171950177
edit:
ssh root@c-67-172-227-181.hsd1.ut.comcast.net
Using keyboard-interactive authentication.
Password:
Access denied
Using keyboard-interactive authentication.
Password:
Access denied
Using keyboard-interactive authentication.
Password:
Access denied
Using keyboard-interactive authentication.
Password:
Access denied
Using keyboard-interactive authentication.
Password:
Access denied
OK, I give up!
Bookmarks