For Programmers: Free Programming Magazines  


Home > Archive > PHP Language > April 2005 > Fasttemplates - retrieving client's IP-address









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Fasttemplates - retrieving client's IP-address
Sjur Rondestveit

2005-04-15, 8:56 pm

Hi all!

I'm using fasttemplates and php on my website. The php-files work fine
on their own, but under fasttemplates I cannot seem to retrieve the
client's IP-address. Both $REMOTE_ADDR and
$HTTP_SERVER_VARS["REMOTE_ADDR"] return null value. I suspect this
might have to do with the http-header being sent at the wrong time,
but I'm not sure. Could anyone please point me in the right direction?

Sincerely,
Sjur Rondestveit
Janwillem Borleffs

2005-04-16, 8:55 am

Sjur Rondestveit wrote:
> I'm using fasttemplates and php on my website. The php-files work fine
> on their own, but under fasttemplates I cannot seem to retrieve the
> client's IP-address. Both $REMOTE_ADDR and
> $HTTP_SERVER_VARS["REMOTE_ADDR"] return null value. I suspect this
> might have to do with the http-header being sent at the wrong time,
> but I'm not sure. Could anyone please point me in the right direction?
>


Using PHP v4.1 or up? Then $_SERVER['REMOTE_ADDR'] is your friend...


JW



Sjur Rondestveit

2005-04-19, 8:55 pm

"Janwillem Borleffs" <jw@jwscripts.com> wrote in message news:<4260e282$0$97792$dbd4d001@news.euronet.nl>...
> Sjur Rondestveit wrote:
>
> Using PHP v4.1 or up? Then $_SERVER['REMOTE_ADDR'] is your friend...
>
>
> JW


Thanks a lot, that really helped. Seems like $REMOTE_ADDR nor
$HTTP_SERVER_VARS["REMOTE_ADDR"] are my friends :)

Sincerely,
Sjur Rondestveit
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com