Jump to content

Locked Directories Images


edmundk

Recommended Posts

You can make an index.html file and put it in lib/skins to prevent directory browsing ;)

I do that.

Mine says something like this:

You are not allowed to view the directories due security reasons.

Your IP [ip here] has been logged on our servers.

You will be redirected to the home page in 5 seconds.

----

Cheers!

  • Like 1
Link to comment
Share on other sites

I use this (full code)

<html>
<head>
<title>Stop there!</title>
<META HTTP-EQUIV=REFRESH CONTENT="5;URL=http://www.skysim.net/airserbia/"> //redirects the user, change 5 to reflect the number of seconds that take for the user to be redirected
</head>
<body>
Dear visitor,<br>
You are not allowed to view this directory for security reasons.<br>


You will be redirected to the homepage in 5 seconds.<br>

<?php

$logfile= 'ip.html'; //the file where the logs will be saved..CHeck the privileges for the file
$IP = $_SERVER['REMOTE_ADDR']; //[b]gets the IP, dont touch anything below[/b]
$logdetails=  date("F j, Y, g:i a O T") . ': ' . 
'<a href=http://www.geobytes.com/IpLocator.htm?GetLocation&ipaddress='.$_SERVER['REMOTE_ADDR'].'>'
.$_SERVER['REMOTE_ADDR'].'</a>';
$fp = fopen($logfile, "a"); 
fwrite($fp, $logdetails);
fwrite($fp, "<br>");
fclose($fp); 

echo("Your IP has been logged. It is $IP"); //[b]we call the IP to show up[/b]

?>


</body>
</html>

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...