On Mon, Aug 30, 2010 at 05:13:59PM -0400, Paul M Foster wrote: > On Mon, Aug 30, 2010 at 10:34:42PM +0200, Peter Lind wrote: > > > On 30 August 2010 22:34, Paul M Foster <pa...@quillandmouse.com> wrote: > > > On Mon, Aug 30, 2010 at 09:53:46PM +0200, Peter Lind wrote: > > > > > <snip> > > > >> > $_SERVER['REMOTE_NAME'] > > >> > > > >> > So the question is, how would he get that last variable. It becomes > > >> > complicated when using a shared hosting environment, because server > > >> > names and IPs aren't a 1:1 mapping. An IP may represent numerous > actual > > >> > site names. This was part or all of the reason why the http > protocol was > > >> > revised from 1.0 to 1.1-- in order to accommodate all the domains, > which > > >> > because of the cramped IP space of IPv4, had to share IPs. So in the > > >> > HTTP 1.1 protocol, there is additional information passed about > the name > > >> > of the domain. > > >> > > > >> > > >> In the scenario painted, it's explicitly stated that one server acts > > >> as a client in trying to access a resource on another server. Could > > >> you enlighten me as to where the domain name of a client is located in > > >> the request header fields? Here's the RFC for HTTP 1.1 > > >> http://www.w3.org/Protocols/rfc2616/rfc2616-sec5.html#sec5.3 > > > > > > From http://www8.org/w8-papers/5c-protocols/key/key.html: > > <snip> > > > > > > > My mistake, though: this change was by no means the only reason for the > > > creation of HTTP 1.1 > > > > Not only that, it has nothing whatsoever to do with the case at hand. > > The Host header field specifies the domain you're asking a resource > > from, not the the domain of the client. Hence, it cannot be used in > > any fashion to provide identification of the client doing the request, > > which is what Tedd wanted. > > Tedd was looking for the server name for the remote server, as seen from > the perspective of the asking server. In his example, he was looking for > a variable which would tell him "Slave's" name from "Master's" > perspective. That's why he was asking if there was anything like > $_SERVER['REMOTE_NAME'] as a known PHP server variable.
I'm mistaken here. He's looking for the name of the server making the request, which doesn't appear to be transmitted anywhere. Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php