Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #15311

Re: [ Get Hostname ]

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!1.eu.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!newsfeed.straub-nv.de!weretis.net!feeder1.news.weretis.net!news.solani.org!.POSTED!not-for-mail
From "Christoph M. Becker" <cmbecker69@arcor.de>
Newsgroups comp.lang.php
Subject Re: [ Get Hostname ]
Date Tue, 12 May 2015 02:33:36 +0200
Organization solani.org
Lines 25
Message-ID <mirhou$ts7$1@solani.org> (permalink)
References <ad6347be-372c-4f89-9511-2c0ebb989a0e@googlegroups.com>
Mime-Version 1.0
Content-Type text/plain; charset=utf-8
Content-Transfer-Encoding 7bit
X-Trace solani.org 1431390814 30599 eJwFwYEBgDAIA7CXANtOzkGQ/09YwkeuPhAFLrcT5g26zDG2VZP0BWmhrrH0jG//eFFHOxcKjRDD (12 May 2015 00:33:34 GMT)
X-Complaints-To abuse@news.solani.org
NNTP-Posting-Date Tue, 12 May 2015 00:33:34 +0000 (UTC)
User-Agent Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0
X-User-ID eJwNxckBwDAIA7CVuGzCOCmF/Udo9RGcys4gGFhse1uIqsyaXzuh5RQB/iVz8rGXUTZdazj3A/eND9c=
In-Reply-To <ad6347be-372c-4f89-9511-2c0ebb989a0e@googlegroups.com>
Cancel-Lock sha1:ex+xPnAtnVo0JXRm//QMQ8Uls7g=
X-NNTP-Posting-Host eJwFwQUBADAIALBKcDwO2j/CNyFFbWMVZTk5ikF+wUmLbq8cHeqZBSx2bV9QZ5IdTEDMfAmvEQQ=
Xref csiph.com comp.lang.php:15311

Show key headers only | View raw


alissonlinneker@gmail.com wrote:

> How do I get file_get_contents return the client domain that is
> referring to the url?
> 
> $ _SERVER ["REMOTE_ADDR"] is returning the shared hosting DNS reverse
> and not site.com
> 
> Example:
> 
> Server have url: http://server.com/test.html
> 
> And client (client.com) get contents:
> 
> file_get_contents('http://server.com/test.html')
> 
> On server.com i need echo the client host (client.com)
> 
> How to?

You can try $_SERVER['HTTP_REFERER'].

-- 
Christoph M. Becker

Back to comp.lang.php | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[ Get Hostname ] alissonlinneker@gmail.com - 2015-05-11 17:10 -0700
  Re: [ Get Hostname ] "Christoph M. Becker" <cmbecker69@arcor.de> - 2015-05-12 02:33 +0200
    Re: [ Get Hostname ] alissonlinneker@gmail.com - 2015-05-11 17:38 -0700
      Re: [ Get Hostname ] Jerry Stuckle <jstucklex@attglobal.net> - 2015-05-11 20:55 -0400
  Re: [ Get Hostname ] gordonb.rtzee@burditt.org (Gordon Burditt) - 2015-05-12 01:22 -0500
    Re: [ Get Hostname ] Matthew Carter <m@ahungry.com> - 2015-05-12 09:38 -0400
      Re: [ Get Hostname ] alissonlinneker@gmail.com - 2015-05-12 12:28 -0700
        Re: [ Get Hostname ] Jerry Stuckle <jstucklex@attglobal.net> - 2015-05-12 17:09 -0400
          Re: [ Get Hostname ] alissonlinneker@gmail.com - 2015-05-12 14:12 -0700
            Re: [ Get Hostname ] Matthew Carter <m@ahungry.com> - 2015-05-12 18:31 -0400
            Re: [ Get Hostname ] Jerry Stuckle <jstucklex@attglobal.net> - 2015-05-12 21:52 -0400
        Re: [ Get Hostname ] gordonb.6xh3q@burditt.org (Gordon Burditt) - 2015-05-13 18:25 -0500
      Re: [ Get Hostname ] Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-05-13 20:37 +0200
  Re: [ Get Hostname ] Denis McMahon <denismfmcmahon@gmail.com> - 2015-05-12 12:09 +0000
  Re: [ Get Hostname ] alissonlinneker@gmail.com - 2015-05-12 17:13 -0700
    Re: [ Get Hostname ] Erwin Moller <erwinmollerusenet@xs4all.nl> - 2015-05-13 18:09 +0200
  Re: [ Get Hostname ] Arno Welzel <usenet@arnowelzel.de> - 2015-05-18 09:56 +0200
    Re: [ Get Hostname ] Arno Welzel <usenet@arnowelzel.de> - 2015-05-18 10:04 +0200
      Re: [ Get Hostname ] Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-05-18 15:26 +0200
        Re: [ Get Hostname ] Arno Welzel <usenet@arnowelzel.de> - 2015-05-18 15:53 +0200
          Re: [ Get Hostname ] Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-05-18 15:58 +0200
        Re: [ Get Hostname ] "Peter H. Coffin" <hellsop@ninehells.com> - 2015-05-18 09:53 -0500
    Re: [ Get Hostname ] Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2015-05-18 11:30 -0400

csiph-web