These question got closed as individuals people did less than understand my question.

I've got a computer that hosts multiple domain names. I've another computer that hosts another another domain names. A number of individuals domain names take presctiption both computer systems.

There IP addresses (both computer systems have multiple IP addresses) are unique to particular computer.

A sub-domain only is available on a single computer.

e.g. kingdom endures computer A kingdom endures computer B

The domain being kingdom.

So now you ask , from kingdom -> how do you discover the domain kingdom in PHP?

Computer A: 192.168..2 hosts kingdom

Computer B: 192.168..3 hosts kingdom

For any script on Computer A to solve " kingdom", edit the hosts file on Computer A (/etc/hosts on Mac OS X/Unix, for Home windows, Google to locate in which the hosts file is) and add the entry:

192.168..3 kingdom

use parse_url function in php to get domain title

also take a look previosuly clarified link

Get domain name (not subdomain) in php

Knowing their email list of domain names against machines then why not make a move such as this?

$server_map = array(
    '' => 'A',
    '' => 'B',
$path = parse_url('');
if(array_key_exists($path['path'], $server_map)) {
    $server = $server_map[$path['path']];

$server now consists of the server letter you would like.