How do I get the IP addresses of the visitors?

You can use this to get the visitor’s IP address!


<form action="saveip.php" id="ip-form" method="post">
    <fieldset>
        <label>
            What is your IP address:
            <input type="text" name="ip" id="ip" value="" />
        </label>
        
        <input type="submit" value="Send IP Address" />
        
    </fieldset>
</form>


There are ways of doing it in javascript, but they are not recommended and are not very reliable. To be honest, I think OPs best bet is to use some sort of web widget.

I know this is quite an old thread, but I wonder If you understood the question right? You suggest that someone types in his/her IP Address, but I think the intention of the question was how to get the IP address from people visiting the site without them entering the actual address

Donboe, I certainly understand the question, I was just being mean :slight_smile: