NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming > CODE
Reload this Page [SNIPPET] Get Current Domain Name

CODE This forum is for posting code snippets and example scripts that aren't quite tutorials, but could be useful for others. You may post code snippets and/or completed scripts that you've written and want to share here.

Advanced Search
7 members in live chat ~  


Closed Thread
 
LinkBack Thread Tools
Old 08-04-2007, 03:20 AM THREAD STARTER               #1 (permalink)
Danltn.com
 
Daniel's Avatar
Join Date: May 2007
Location: Danltn.com / Nottingham, UK
Posts: 1,201
Daniel has a reputation beyond reputeDaniel has a reputation beyond reputeDaniel has a reputation beyond reputeDaniel has a reputation beyond reputeDaniel has a reputation beyond reputeDaniel has a reputation beyond reputeDaniel has a reputation beyond reputeDaniel has a reputation beyond reputeDaniel has a reputation beyond reputeDaniel has a reputation beyond reputeDaniel has a reputation beyond repute
 


Ethan Allen Fund Ethan Allen Fund

[SNIPPET] Get Current Domain Name


This is a snippet which will show the current domain name.

Posting this as I had a few requests by people

PHP Code:
<?php $pageUR1  ereg_replace("/(.+)"""$_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"]);
????: NamePros.com http://www.namepros.com/code/357712-snippet-get-current-domain-name.html
$curdomain  str_replace("www."""$pageUR1); 
echo 
$curdomain;
Last edited by Danltn; 08-04-2007 at 03:23 AM.
Daniel is offline  
Old 08-04-2007, 07:55 AM   #2 (permalink)
Senior Member
Join Date: Dec 2006
Location: England
Posts: 1,565
Matthew. has much to be proud ofMatthew. has much to be proud ofMatthew. has much to be proud ofMatthew. has much to be proud ofMatthew. has much to be proud ofMatthew. has much to be proud ofMatthew. has much to be proud ofMatthew. has much to be proud ofMatthew. has much to be proud of
 


Adoption Breast Cancer Breast Cancer Cancer Survivorship
Also available...
PHP Code:
$_SERVER['HTTP_HOST']; 
????: NamePros.com http://www.namepros.com/showthread.php?t=357712
Matthew. is offline  
Old 08-04-2007, 08:03 AM THREAD STARTER               #3 (permalink)
Danltn.com
 
Daniel's Avatar
Join Date: May 2007
Location: Danltn.com / Nottingham, UK
Posts: 1,201
Daniel has a reputation beyond reputeDaniel has a reputation beyond reputeDaniel has a reputation beyond reputeDaniel has a reputation beyond reputeDaniel has a reputation beyond reputeDaniel has a reputation beyond reputeDaniel has a reputation beyond reputeDaniel has a reputation beyond reputeDaniel has a reputation beyond reputeDaniel has a reputation beyond reputeDaniel has a reputation beyond repute
 


Ethan Allen Fund Ethan Allen Fund
Bah all these smart people.
Daniel is offline  
Closed Thread


LinkBacks (?)
LinkBack to this Thread: http://www.namepros.com/code/357712-snippet-get-current-domain-name.html
Posted By For Type Date
php get current domain name - Google Search This thread Refback 04-27-2011 12:05 PM

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


 
All times are GMT -7. The time now is 07:07 PM.

Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger