[ Get Hostname ] - Page 2

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

Re: [ Get Hostname ]

Am 2015-05-18 um 15:26 schrieb Thomas 'PointedEars' Lahn:

Quoted text here. Click to load it

I assumed the "client" is in fact a *server* which uses PHP to fetch
content from another server - and as the OP explained in

"I'm trying to identify the domain that is carrying out consultations in
my API.

The API is limited by domain, so I need to know which domain came the query"

So I hope it's clear that we are not talking about clients using their
dial-up-connections to run PHP scripts accessing the OPs web server.

Quoted text here. Click to load it

See above.

Arno Welzel

Re: [ Get Hostname ]

Arno Welzel wrote:

Quoted text here. Click to load it

Not necessarily.  However, that is what API keys are for.  You do _not_  
simply allow everyone on the Net to run any programs on your server.

Zend Certified PHP Engineer
Twitter: @PointedEars2
Please do not cc me. / Bitte keine Kopien per E-Mail.

Re: [ Get Hostname ]

On Mon, 18 May 2015 15:26:34 +0200, Thomas 'PointedEars' Lahn wrote:

Quoted text here. Click to load it

You missed the context entirely, Sparky.  

OP an API to other websites as a paid service. He wants to validate
that requests hitting his API engine from from paying customers. He
wanted to use the domain of the IP address, but has since learned that
that unreliables and the recommendation of including a validation
key/password as part of the API request may have to do has been floated.

48. I will treat any beast which I control through magic or technology
    with respect and kindness. Thus if the control is ever broken, it  
    will not immediately come after me for revenge.
    --Peter Anspach's list of things to do as an Evil Overlord

Re: [ Get Hostname ]

On Monday May 18 2015 03:56, in comp.lang.php, "Arno Welzel"

Quoted text here. Click to load it

Be aware that, if the client side runs on an IP address shared by multiple
FQDNs, nslookup may not provide the exact client FQDN that the OP expects.

For instance, "Big Company" (big.co) has subsidiaries "Small Company"
(small.co) and "Bigger Company" (bigger.co), and has configured their DNS to
provide names in each of these domains for each public IP address.

Client works for "Small Company", and typically refers to his workstation
address as client.small.co.  nslookup() on his IP address /may/ return the
FQDN of client.big.co or client.bigger.co.

This is more observable when using external hosting services, where each
client's system is actually virtualized on a single machine (think how most
web hosting companies work); "Big Company" and all it's subsidiaries may
share IP addresses with hundreds, if not thousands of other domains, each of
which has a FQDN.

Just say'n
Lew Pitcher
"In Skills, We Trust"
PGP public key available upon request

Site Timeline