PHP访客自动拍照记录:时间、IP及实现代码
// 获取访客IP地址
$ip = $_SERVER['REMOTE_ADDR'];
// 获取当前时间
$time = date('Y-m-d H:i:s');
// 拍照并保存
$photo = imagegrabscreen();
imagepng($photo, 'screenshot.png');
// 保存记录
$file = fopen('visit_log.txt', 'a');
fwrite($file, '访问时间:'.$time.',访问IP:'.$ip.'\n');
fclose($file);
?>
原文地址: https://www.cveoy.top/t/topic/jxXj 著作权归作者所有。请勿转载和采集!