ip loggs
Moderator: General Moderators
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
i find it VERY hard to believe you read thelinked thread. or that you read the partiular points i brought to your attention. or this: http://www.catb.org/~esr/faqs/smart-que ... l#examples
why? your response. you came here looking for someone to just GIVE you stuff.
in my humble opinion Nay was WAY to polite. she shouldn't have given that much considering how you responded to the one who pointed you to $_SERVER['REMOTE_ADDR']
why? your response. you came here looking for someone to just GIVE you stuff.
in my humble opinion Nay was WAY to polite. she shouldn't have given that much considering how you responded to the one who pointed you to $_SERVER['REMOTE_ADDR']
ok sory i need to know how to log people's ip's passwords and user names i dont have any think related to it i just have a simple site Http://www.vibe-tech.co.uk
OK, I told you about $REMOTE_ADDRESS, Nay told you about $_SERVER['REMOTE_ADDR']BenCollo wrote:ok sory i need to know how to log people's ip's passwords and user names i dont have any think related to it i just have a simple site Http://www.vibe-tech.co.uk
Go to php.net for details.
Then I asked what you want to log to, no answer.
If you want to log to a file, then use the FOPEN command to write stuff to a text file. php.net has examples of how to use FOPEN.
does my name sound like a girls'?.......m3rajk wrote:i find it VERY hard to believe you read thelinked thread. or that you read the partiular points i brought to your attention. or this: http://www.catb.org/~esr/faqs/smart-que ... l#examples
why? your response. you came here looking for someone to just GIVE you stuff.
in my humble opinion Nay was WAY to polite. she shouldn't have given that much considering how you responded to the one who pointed you to $_SERVER['REMOTE_ADDR']
.........
for your information, I'm a guy.
Forget about it.
-----------------------------------------------
Okay, I think I see where you're going.
You're trying to do a log in script, that also gets the IP of the person logging in, right?
Here's how to go about it:
- Get user information from a form and post it.
- Connect to MySQL, and get the row matching the information.
- If there are no rows returned, echo log in failed, or so.
- If there is a match, then get the user's IP.
- Then store it into a MySQL table.
- Start a session.
- Store the username or some information into the session.
- Redirect the user to the protected page.
Check for the variables in the session on the protected pages. I've got the script lying around somewhere in my hard drive, but I'd rather let you learn how to do it.
-Nay
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK