Solved

URGENT '-' looking for php security for a directory....scare/real

Posted on 2004-10-19
4
224 Views
Last Modified: 2010-04-17
I have a directory that I don'y just want to CHMOD. I want php security. fake and real...
right now I have it recording their ip. so I can log there info and visits.
please provide code example for I'm at a lost..
I would like to display all availbe infomation and maybe record it.
as well as care them to never try accessing this directory again.

thanks
caiapfas
0
Comment
Question by:Caiapfas
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 2

Author Comment

by:Caiapfas
ID: 12351505
I would like to display all availbe infomation and maybe record it.

*I would like to display all availbe infomation about the user and maybe record it.
================================================

as well as care them to never try accessing this directory again.

*as well as scare them to never try accessing this directory again.
===============================================
all tatics are welcome
0
 
LVL 5

Accepted Solution

by:
rsriprac earned 500 total points
ID: 12352819
In PHP, all information about the client will be found in the '$_SERVER' varible, and you can access, i.e. IP address, by going $_SERVER['REMOTE_ADDR'].  You can find the full list of information'$_SERVER provides at: http://us2.php.net/reserved.variables

I would say print out all the infomation about them and say it is recorded.  You should record it in either a flat file or a database.  

Good article to write to file: http://www.phpnoise.com/tutorials/20/3
Good article to insert to a database: http://www.infinite-fire.net/tutorials/photoshop/insert-data-into-a-mysql-database

As for the real security, you could use htaccess based security: http://www.novia.net/~tomcat/HowTo/password.html

and custom a 403 Forbidden page with your 'to scare' bad users, i.e. the PHP page the we talk about above.    ITs the same as making custom 404 pages: http://www.pageresource.com/zine/custom404.htm
0
 
LVL 2

Author Comment

by:Caiapfas
ID: 12360351
just want some tracking/scary stuff........
i'm looking into http://us2.php.net/reserved.variables..thanks

anything you can show will be grately app.
0
 
LVL 5

Expert Comment

by:rsriprac
ID: 12558378
I think using REMOTE_ADDR and displaying the IP address and saying that is has been recorded usually scares most people. (=  I dont know of how much more of an example because I usually just save the trouble and make the site super secure.
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Displaying an arrayList in a listView using the default adapter is rarely the best solution. To get full control of your display data, and to be able to refresh it after editing, requires the use of a custom adapter.
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Simple Linear Regression
Starting up a Project

626 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question