Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2004-10-19
4
Medium Priority
?
228 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
  • 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 1500 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This is about my first experience with programming Arduino.
This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
Simple Linear Regression
Progress

824 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