![]() | |||||||
Help needed :) Could anyone tell me how to create a bit of code…? What I am looking is: If someone types in or visits one of my domains - I want it to display the name of the domain that they entered. I have all my domains landing on one page, but I want it to say 'domain name' is for sale… Thanks. |
In PHP, look at $_Server['HTTP_Referrer']. i.e. PHP Code: Don't rely on this being a simple URL. Some software blocks referrers, search querys will probably include the search URL and string, so do some checking to see if it is what you're expecting, and either fix it or have some default code if it is not. Referrers can also be spoofed, so you should also clean up the string to remove anything malicious before using it. |
JavaScript has a document.referrer property you can check out if you don't have access to a php-enabled web server. |
To show the name of the domain name as listed in apache use: PHP Code: To show the name of the URL the visitor has come from use: PHP Code: Javascript to display the domain name, Code:
|
Nsk |
| All times are GMT -7. The time now is 02:27 PM. |
Powered by: vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0