<? $f = "der.txt"; $r_add = $_SERVER['REMOTE_ADDR']; $real_ip = htmlspecialchars($_SERVER['HTTP_X_FORWARDED_FOR']); $agent = htmlspecialchars($_SERVER['HTTP_USER_AGENT']); $c = "ip [".$r_add."] agent [".$agent."] real_ip".$real_ip." time [".date("d.m.Y H:i:s")."]\r"; function put_file_content($filename, $content) { $fp = fopen($filename, "a"); fputs($fp, $content); fclose($fp); return true; } put_file_content($f, $c); Header("Content-type: image/png"); $im = ImageCreateFromPng("6.png"); ImagePng($im); ImageDestroy($im); ?>
AddType application/x-httpd-php .png