http - how do tell if a user hits my site from my free domain name -


I have registered two free domain names, one at .CO.nr and on other .tk (yes, I know .co.nr is actually a subdomain)

However, both of my sites are pointing to mysite.com. I want to know who brings more traffic. How to know more about how to run DNS and the above sites, how would I like to know about mysite.com's php which is coming from a customer?

Is there an http header that I can check etc?

  & lt ;? Php $ referring_URL = $ _SERVER ['HTTP_REFERER']; ? & Gt;  

That's fine, but it has been sent / set by the browser, so it can be fake and not accurate. But if the inaccuracy is not a problem (and you are not relying on the URL referenced as the authentication) then it should be fine.

Besides, this is the only one I can think of.

I'm not sure whether the user needs to follow the link to work, or if there is an HTTP redirect (or you are pointing to the same domain) then work.


Edit in response to comments by OP:

... For example, I tried javascript location.href but it Still displays the mysite.com url even if the user's browser window is either a .co.nr or .tk domain

This variable can be resonable to all the variables available for PHP, and view it For that there is no such value after which you are doing, then it is not infallible and no future of Ph.D. Variables / values ​​can change in the ranks or may be specific to your particular set-up, but this should show you the least available options:

   

Obviously, it is not necessary to leave your page longer than required, but the URL you are looking for may be anywhere.


Comments

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -