[advanced search]
NamePros Domain Auction
Live Event This Thursday at 6PM EDT - Prebidding open now
35 members in the live chat room. Join Chat!
Register Rules & FAQ NP$ Store Active Threads Mark Forums Read
Go Back   NamePros.Com > Design and Development > Web Design Discussion
User Name
Password

Old 05-06-2008, 03:06 AM   · #1
KillerDomain
NamePros Regular
 
KillerDomain's Avatar
 
Name: Damien
Location: Belfast, Northern Ireland
Trader Rating: (24)
Join Date: Jun 2006
Posts: 576
NP$: 0.00 (Donate)
KillerDomain is just really niceKillerDomain is just really niceKillerDomain is just really niceKillerDomain is just really nice
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.


Please register or log-in into NamePros to hide ads
__________________
ArcadeAnywhere.com
KillerDomain is offline   Reply With Quote
Old 05-06-2008, 04:13 AM   · #2
enlytend
NamePros Regular
 
Location: USA
Trader Rating: (5)
Join Date: Aug 2006
Posts: 373
NP$: 43.70 (Donate)
enlytend is just really niceenlytend is just really niceenlytend is just really niceenlytend is just really nice
In PHP, look at $_Server['HTTP_Referrer']. i.e.

PHP Code:
<?php echo $_Server['HTTP_Referrer']; ?> is for sale


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.
enlytend is offline   Reply With Quote
Old 05-08-2008, 12:57 PM   · #3
netzilla
Senior Member
 
netzilla's Avatar
 
Name: Josh Evans
Location: Ohio
Trader Rating: (28)
Join Date: Aug 2005
Posts: 1,544
NP$: 36.75 (Donate)
netzilla is a splendid one to beholdnetzilla is a splendid one to beholdnetzilla is a splendid one to beholdnetzilla is a splendid one to beholdnetzilla is a splendid one to beholdnetzilla is a splendid one to beholdnetzilla is a splendid one to behold
JavaScript has a document.referrer property you can check out if you don't have access to a php-enabled web server.
netzilla is offline   Reply With Quote
Old 05-08-2008, 01:28 PM   · #4
tres
NamePros Regular
 
tres's Avatar
 
Location: US
Trader Rating: (20)
Join Date: Oct 2003
Posts: 375
NP$: 122.75 (Donate)
tres is a jewel in the roughtres is a jewel in the roughtres is a jewel in the rough
To show the name of the domain name as listed in apache use:
PHP Code:
$_SERVER['HTTP_HOST']


To show the name of the URL the visitor has come from use:
PHP Code:
$_SERVER['HTTP_REFERRER']
Note: http_referrer may be blank for a number of reasons.

Javascript to display the domain name,
Code:
<script type="text/javascript"> document.write(document.domain); </script>
__________________
workerpermits.com blogsom.com UnixSolutions.com ForexTutor.com LinuxWireless.com

Last edited by tres : 05-08-2008 at 01:51 PM.
tres is offline   Reply With Quote
Reply

NamePros is a revenue sharing forum.

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


Site Sponsors
Get Me Visits www.clixnhits.com Proof is in the Parking
Advertise your business at NamePros
All times are GMT -7. The time now is 04:01 PM.


Powered by: vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0