Solved

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

Posted on 2004-10-19
4
219 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

This article will show, step by step, how to integrate R code into a R Sweave document
This is an explanation of a simple data model to help parse a JSON feed
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
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…

744 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

16 Experts available now in Live!

Get 1:1 Help Now