Unstoppable Domains — Expired Auctions

Help needed

Spacemail by SpaceshipSpacemail by Spaceship
Watch

KillerDomain

Established Member
Impact
1
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.
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
In PHP, look at $_Server['HTTP_Referrer']. i.e.

PHP:
<?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.
 
0
•••
JavaScript has a document.referrer property you can check out if you don't have access to a php-enabled web server.
 
0
•••
To show the name of the domain name as listed in apache use:
PHP:
$_SERVER['HTTP_HOST']

To show the name of the URL the visitor has come from use:
PHP:
$_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>
 
Last edited:
0
•••
Nsk

OK..
www.9nsk.cn.
ntn SKF FAG NSK timken
http_imgload.gif
 
0
•••
Appraise.net

We're social

Escrow.com
Spaceship
Rexus Domain
CryptoExchange.com
Domain Recover
CatchDoms
DomainEasy — Zero Commission
DomDB
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back