我试图跟踪使用PHP和HTTAccess hotlinkers的IP地址。我如何跟踪热链接器IP地址使用PHP和htaccess
.htaccess文件:
RewriteEngine on
RewriteRule images/(.+)\.(jpg|gif|png) images.php
images.php
?php
$ipAddress = $_SERVER['REMOTE_ADDR'];
$statement=$db->prepare("INSERT INTO `ipaddress` (`ip`)
VALUES (?)");
$statement->execute(array($ipAddress));
?>
现在用户请求这样www.domain.com/images/image.jpg会重定向到图像的图像。 PHP和跟踪他们的ips。我在这里面临的问题是我的页面内没有显示图像(原因htaccess重定向到images.php)。我该如何解决这个问题?
Here is the link of previous question regarding this issue:
我不是htaccess的专家如果要记录的IP,然后服务形象,无论如何,那么这样的事情可能这样做需要更多的解释
感谢
你想做什么?你想记录IP和显示图像,或只是登录并退出给每个人,只显示图像,而无需登录自己的网站? –
我想记录IP并显示图像。 –