Help request

SpaceshipSpaceship
Namecheap AuctionsNamecheap Auctions
SpaceshipSpaceship
Watch

KillerDomain

Established Member
Impact
1
Hi, I own PDNS.co.uk

I have all my other domains landing on the main page. I was hoping that someone could provide me with a bit of code that will display the name of the referring domain name.

Like "Domain.com is for sale..." but just the actual domain name, not www or www.domain.com/example/abc...

If you can help, please let me know.

Thanks in advance!
 
0
Close
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
Anyone able to help?
 
0
Close
PHP:
<?
$host=parse_url($_SERVER['HTTP_REFERER']);
$host=$host['host'];
$host=preg_replace("/^www\./i" ,"", $host);  
echo $host;
?>

There ya go!
 
0
Close
Thanks but it dosnt seem to work on my site.
 
0
Close
DomainEasy: white label portfolios are live. Enable yours.

We're social

Escrow.com
Spaceship
Domain Recover
CryptoExchange.com

NamePros updates

Switch between accounts
You can now stay logged in to more than one NamePros account in the same browser. Click your avatar, then "Accounts in this browser", to...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back