Re: Questions about $_SERVER

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 28 August 2010 23:45, tedd <tedd.sperling@xxxxxxxxx> wrote:
> At 9:41 PM +0200 8/28/10, Per Jessen wrote:
>>
>> tedd wrote:
>>  >
>>>
>>>  So, how can I identify the exact location of the 'server_addr' and of
>>>  the 'remote_addr' on shared hosting? Is that possible?
>>
>> $_SERVER['SERVER_NAME'] will tell you the name of the virtual host - I
>> don't know if that is what you're after.
>>
>> --
>> Per Jessen, Zürich (12.2°C)
>
> Certainly, $_SERVER['SERVER_NAME'] will tell you the name of the virtual
> host, but what about the virtual remote?
>
> You see, I can have a script on one server communicate with another script
> on a another server and the remote addresses reported on either will not
> translate back to their respective virtual hosts, but instead to their
> hosts.
>
> So, I'm trying to figure out a compliment to $_SERVER['SERVER_NAME'] such as
> something like $_SERVER['REMOTE_NAME'].
>
> Is there such a beast?
>

You're not making any sense. For the script on your local host to be
able to connect and communicate with the remote host, it would need to
know the name of the remote host. Hence, the local host already knows
the name and has no reason to ask the remote host for a name by which
to contact it.
 That's what I get from your description of the problem. You probably
want to clarify some things.

Regards
Peter

-- 
<hype>
WWW: http://plphp.dk / http://plind.dk
LinkedIn: http://www.linkedin.com/in/plind
BeWelcome/Couchsurfing: Fake51
Twitter: http://twitter.com/kafe15
</hype>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux