If someone send XHR request from some-client.com to some-rest.com, I want get origin(domain name, not client ip) of the request wi
some-client.com
some-rest.com
in php you can get using $_SERVER['HTTP_REFERER']. if you are using codeigniter then you can get the referrer using $this->agent->is_referral().