Welcome to HBH! If you have tried to register and didn't get a verification email, please using the following link to resend the verification email.

IP logging html or java script?


ghost's Avatar
0 0

Hi! I'm looking for a script that se the connected users ip and then save in a .txt document on my server.

What i mean is that when someone connects to my webpage the script saves the persons ip and then put it in a logg. I kinda sux att java and i can't find anyone in html.

Plz help.


hellboundhackersok's Avatar
Banned
0 0

Uber0n wrote: You can't do that in HTML or javascript.

This is because they're client-side, correct?


Uber0n's Avatar
Member
0 0

Yes. Client-side languages can't create or modify files on the server ;)


hellboundhackersok's Avatar
Banned
0 0

Uber0n wrote: Yes. Client-side languages can't create or modify files on the server ;) Okay, thanks. :)


ghost's Avatar
0 0

Yeah PHP would be the easiest way to do it. The most sensible thing would be to google for something like an "IP Logger PHP" or something along those lines.

However if I were you I'd learn PHP and make one yourself. It's really not all that hard.

You just need to specify the logs.txt's location and use the $_SERVER['remote_addr']; command and write all the logs to logs.txt


ghost's Avatar
0 0

Thanks for all the answers. Looks like i have to do the site in php then :P


ghost's Avatar
0 0

No worries. That's what we're here for. Also you can make your website MUCH more dynamic when your using PHP instead of just HTML. If you need any PHP help im sure there are a lot of people here who will help you, including myself.