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

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

Question by:Caiapfas
  • 2
  • 2

Author Comment

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

Accepted Solution

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:

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:
Good article to insert to a database:

As for the real security, you could use htaccess based security:

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:

Author Comment

ID: 12360351
just want some tracking/scary stuff........
i'm looking into

anything you can show will be grately app.

Expert Comment

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.

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

815 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

8 Experts available now in Live!

Get 1:1 Help Now