Question:
Does anybody know what HTML code I can add to my website that logs the IP's of those who visit ?
LIMIT
2008-04-03 14:01:31 UTC
I've seen codes that make a pop up window appear saying "you're ip address is... x.x.x.x" but that doesn't record them to a log, it only alerts the visitor to their own IP address. I want a code that records their IP address and adds to a log file of some sort so that I can see all IP addresses of those who visit.
Six answers:
kostiak
2008-04-03 14:06:48 UTC
one great way to do it is with

www.statcounter.com/
2008-04-03 14:29:13 UTC
The pop-ups you're talking about are javascript - that runs in the browser, so it can't log anything on the server. You need code on the server (php, for example) to grab the IP address and save it to a file or database. (HTML isn't code, it's content.)
2016-10-21 15:06:56 UTC
until eventually the photo is interior an identical listing because the html record, you want to specify a direction to the photo. operating example, in the adventure that your html record is on your webroot, and also you placed your pictures in a subdirectory of your webroot noted as 'pictures', your html ought to seem as if this: To center the photo, use css - img { margin: 0 automobile; exhibit: block;} or
2008-04-03 14:24:35 UTC
if you are using a form for example that sends data to you which is then saved in a database you could have a hidden field in which you can write the php code

$ip=$_SERVER['REMOTE_ADDR'];



which will grab the users ip adress and save it into a database field.



you will have to learn some basic php to do this tho
2008-04-03 14:08:41 UTC




Warren O
2008-04-03 14:07:20 UTC
You must have a server-side program to log this. Without the server-side program to log it, it is not possible.


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...