I wanna make my page script write a .txt file to log the IP/Date/Times someone has reached the Sorry, Page not found!PHP Code:<?php
$pages_dir = 'pages';
if (!empty($_GET['id'])) {
$pages = scandir($pages_dir, 0);
unset($pages[0], $pages[1]);
$id = $_GET['id'];
if (in_array($id.'.inc.php', $pages)) {
include ($pages_dir.'/'.$id.'.inc.php');
} else {
echo 'Sorry, Page not found!';
}
} else {
include($pages_dir.'/home.inc.php');
}
?>
My old coder is unable to be reached to get this done anyone able to help me ?


Reply With Quote