FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Get IP Address Help
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Get IP Address Help [message #170791 is a reply to message #170709] Fri, 26 November 2010 17:11 Go to previous message
Twayne is currently offline  Twayne
Messages: 135
Registered: September 2010
Karma:
Senior Member
In news:ocu3e6tdjs4rbm7pm43haa32hfdtv3d9vb(at)4ax(dot)com,
Jim Higgins <invalid(at)invalid(dot)invalid> typed:
> PHP 5.2.13
>
> I'm trying to capture a visitor's IP address in a web form
> (a ballot for club office) and am coming up empty handed.
> Purpose is to head off ballot box stuffing. All sorts of
> Googling keeps coming up with the following...
>
> <input type="hidden" name="ip"
> value="<?php echo $_SERVER['REMOTE_ADDR'] ?>">
>
> which just gives me the literal PHP script between the
> double quotes instead of the voter's IP address.
>
> Help please?

It's easy to get a visitor's IP address, but ... realize that this IP
address will NOT last.
If it's a dialup, EVERY time they exit/enter, they'll have a new IP.
If it's DSL, the IP changes on usually a set schedule with a few
exceptions. Most seem to get a new IP at least every 24 hours or less, plus
the user can easily kill and request a new address anytime he wants to.
I don't know what FIOS does; it's a different animal and so if IPV6.

Your IP CAN be changed even as you are using your client for access.

You really need to make yourself familiar with "the man ual" and other PHP
resources; then you wouldn't have had to ask here.
http://php.net/manual/en/reserved.variables.server.php

http://www.phpbuilder.com/board/showthread.php?t=10327697

http://www.phpf1.com/tutorial/get-ip-address.html

http://www.cyberciti.biz/faq/php-howto-read-ip-address-of-remote-computerbr owser/

Google only has 16 million results on a search, so ... learn how to use it
for what you need. These are all from the first page of displays.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: How to do the String concatenation with PHP - running a little Parser based on cURL
Next Topic: setup of curl-multi: looping over a bunch of sites [how to adress the array]
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Nov 24 23:42:46 GMT 2024

Total time taken to generate the page: 0.04019 seconds