Solved

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

Posted on 2004-10-19
4
220 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 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

This article will show, step by step, how to integrate R code into a R Sweave document
Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

867 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now