Re: [PHP] User's IP Validation

2010-06-17 Thread Ashley Sheridan
On Thu, 2010-06-17 at 12:07 -0300, Juan Rodriguez Monti wrote: > > > > 2010/6/16 Ashley Sheridan > > > On Wed, 2010-06-16 at 20:36 +0200, David Cesal wrote: > > > Please, don't forget IP address can be same for many users. I see > only way with cookies. Whe

Re: [PHP] User's IP Validation

2010-06-17 Thread Juan Rodriguez Monti
2010/6/16 Ashley Sheridan > On Wed, 2010-06-16 at 20:36 +0200, David Cesal wrote: > > Please, don't forget IP address can be same for many users. I see only way > with cookies. When user deletes cookies, form pops up again. I don't know any > better way. > > David > > Sent from my HTC > >

RE: [PHP] User's IP Validation

2010-06-16 Thread Ashley Sheridan
On Wed, 2010-06-16 at 20:36 +0200, David Cesal wrote: > Please, don't forget IP address can be same for many users. I see only way > with cookies. When user deletes cookies, form pops up again. I don't know any > better way. > > David > > Sent from my HTC > > -Original Message- > From

RE: [PHP] User's IP Validation

2010-06-16 Thread David Cesal
Please, don't forget IP address can be same for many users. I see only way with cookies. When user deletes cookies, form pops up again. I don't know any better way. David Sent from my HTC -Original Message- From: Juan Rodriguez Monti Sent: 16. cervna 2010 20:26 To: php-general@lists.p

RE: [PHP] User's IP Validation

2010-06-16 Thread Bob McConnell
If this is an open site, using the IP won't be any good. We have over 200 people behind our NAT firewall, all of which would show up as coming from the same IP on your server. Many other networks have the same or a similar configuration. If you only allow registered users, add a couple of flags to

Re: [PHP] User's IP Address

2002-03-20 Thread Miguel Cruz
On Thu, 21 Mar 2002, Maris Kalnins wrote: > Is there any possibility to get PHP page viewer's ip address.. > for example > > $addr=some_function_that_returns_viewer's_address() $REMOTE_ADDR You might want to play with phpinfo() - it tells you a lot. miguel -- PHP General Mailing List (http:

Re: [Re: [PHP] user's ip]

2001-08-10 Thread Dave Freeman
On 7 Aug 01, at 14:02, René Moonen wrote: > The problem is that REMOTE_ADDR returns the IP address of the proxy (if > if(getenv(HTTP_X_FORWARDED_FOR)) > { > $ip=getenv(HTTP_X_FORWARDED_FOR); > } > else > { > $ip=getenv(REMOTE_ADDR); > } > $host = gethostbyaddr($ip); except, perhaps, when th

Re: [PHP] user's ip

2001-08-08 Thread Renze Munnik
On Wed, Aug 08, 2001 at 12:45:32PM +1000, Chris Birmingham wrote: > I would use > > $HTTP_SERVER_VARS["REMOTE_ADDR"] > or > $HTTP_SERVER_VARS["HTTP_X_FORWARDED_FOR"] > > to return the IP address.. > > I have seen, people using if($ip == $REMOTE_ADDR) { // do whatever } > but in some configurat

Re: [Re: [PHP] user's ip]

2001-08-08 Thread Renze Munnik
On Wed, Aug 08, 2001 at 12:52:42AM +0100, Andreas D. Landmark wrote: > 1) proxies should cache dynamic content > 2) proxies should not retrieve from cache if the request is a force-refresh > 3) proxies should not cache any content which URL includes "?" > > Sounds like you've got yourself a poor

Re: [PHP] user's ip

2001-08-07 Thread Adrian D'Costa
On Tue, 7 Aug 2001, Renze Munnik wrote: > On Tue, Aug 07, 2001 at 03:55:25PM +0530, Adrian D'Costa wrote: > > Hi, > > > > I am trying to get the ip address of any user browsing a particular page. > > > > I tried $REMOTE_ADDR but that give me only the remote address. What would > > be the best

Re: [PHP] user's ip

2001-08-07 Thread Chris Birmingham
ay, 7 August 2001 10:07 PM To: [EMAIL PROTECTED] Subject: Re: [Re: [PHP] user's ip] On Tue, Aug 07, 2001 at 02:01:04PM +0200, René Moonen wrote: > The problem is that REMOTE_ADDR returns the IP address of the > proxy (if the user > accesses the web-page via a proxy. This will allway

Re: [Re: [PHP] user's ip]

2001-08-07 Thread Andreas D. Landmark
At 07.08.2001 13:06, Renze Munnik wrote: >Ahh see, that wasn't clear in the question. Yeah... that's true. >Pain in the ass those proxies. They're also realy useful while >testing your (dynamic) site. NOT!!! "Hey, what's this? I thought I'd >realy changed that error. How's this possible?", "Di

Re: [PHP] user's ip

2001-08-07 Thread Daniel Rezny
Hello Adrian, Tuesday, August 07, 2001, 12:25:25 PM, you wrote: ADC> Hi, ADC> I am trying to get the ip address of any user browsing a particular page. ADC> I tried $REMOTE_ADDR but that give me only the remote address. What would ADC> be the best way? When you recieve a remote_host_name you

Re: [Re: [PHP] user's ip]

2001-08-07 Thread Renze Munnik
On Tue, Aug 07, 2001 at 02:01:04PM +0200, René Moonen wrote: > The problem is that REMOTE_ADDR returns the IP address of the > proxy (if the user > accesses the web-page via a proxy. This will allways return the IP > address of > the user's machine: > > if(getenv(HTTP_X_FORWARDED_FOR)) > { > $ip

[Re: [PHP] user's ip]

2001-08-07 Thread René Moonen
The problem is that REMOTE_ADDR returns the IP address of the proxy (if the user accesses the web-page via a proxy. This will allways return the IP address of the user's machine: if(getenv(HTTP_X_FORWARDED_FOR)) { $ip=getenv(HTTP_X_FORWARDED_FOR); } else { $ip=getenv(REMOTE_ADDR); } $host = g

RE: [PHP] user's ip

2001-08-07 Thread Karl Phillipson
Read this: http://www.php.net/manual/en/function.getenv.php $ip = getenv ("REMOTE_ADDR"); == Karl Phillipson PHP SQL Programmer Saffron Hill Ventures 67 Clerkenwell Road London EC1R 5BL Saffron Hill: 0207 693 8300 Direct Line: 0207 693 8318 -Original

Re: [PHP] user's ip

2001-08-07 Thread Renze Munnik
On Tue, Aug 07, 2001 at 03:55:25PM +0530, Adrian D'Costa wrote: > Hi, > > I am trying to get the ip address of any user browsing a particular page. > > I tried $REMOTE_ADDR but that give me only the remote address. What would > be the best way? > > Adrian Okay... Help me out here... You want