You are here: Re: Server IP Address « PHP Language « IT news, forums, messages
Re: Server IP Address

Posted by Chris Hope on 11/21/31 11:20

Fred Atkinson wrote:

>>What do you think the difference between the webserver and the host
>>is? I would think they are one and the same.
>>
>>$_SERVER['SERVER_ADDR'] will give you IP address of the server the
>>script is running on.
>
> You're right. What I meant was client, not host. I want a
> PHP function that returns the IP address of the Webserver rather than
> the client machine.

$_SERVER['SERVER_ADDR'] gives you the server
$_SERVER['REMOTE_ADDR'] gives you the client

--
Chris Hope | www.electrictoolbox.com | www.linuxcdmall.com

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация