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
Reload this Page Detecting Domain

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.

Advanced Search


Closed Thread
 
LinkBack Thread Tools
Old 07-02-2005, 01:38 PM THREAD STARTER               #1 (permalink)
Awesome™
 
MasterB's Avatar
Join Date: May 2005
Location: Boston
Posts: 77
MasterB is on a distinguished road
 



Detecting Domain


Hey. I'm making a PHP script which will be distributed to many people. Long story short, I need the PHP script to be able to detect the domain name it's hosted on. I don't know how to go about doing this. It would be appreciated if someone could point me in the right direction of how this could be done. Thx in advance.
MasterB is offline  
Old 07-02-2005, 01:46 PM   #2 (permalink)
jdk
Senior Member
 
jdk's Avatar
Join Date: Jul 2004
Location: Florida
Posts: 1,492
jdk has a reputation beyond reputejdk has a reputation beyond reputejdk has a reputation beyond reputejdk has a reputation beyond reputejdk has a reputation beyond reputejdk has a reputation beyond reputejdk has a reputation beyond reputejdk has a reputation beyond reputejdk has a reputation beyond reputejdk has a reputation beyond reputejdk has a reputation beyond repute
 



Why not just read in the nameservers? Or get the ip address it is hosted on?
__________________
All offers are valid for 12 hours unless otherwise stated.
jdk is offline  
Old 07-02-2005, 02:05 PM THREAD STARTER               #3 (permalink)
Awesome™
 
MasterB's Avatar
Join Date: May 2005
Location: Boston
Posts: 77
MasterB is on a distinguished road
 



Well I'm not going to be fully in control of who gets this software, but I have a licensing system where I will keep track of who has it. I'm not sure you fully understand what I need. I need the domain on which the script is hosted. So for example, if the script is on http://thesite.com/script/directory/, I need the script to extract the "thesite.com" part.
MasterB is offline  
Old 07-02-2005, 02:23 PM   #4 (permalink)
Senior Member
Join Date: Aug 2002
Posts: 1,255
deadserious has a spectacular aura aboutdeadserious has a spectacular aura about
 



$_SERVER['HTTP_HOST'] will get the hostname. http://us3.php.net/reserved.variables

Do you need to get it remotely, or?
deadserious is offline  
Old 07-02-2005, 02:26 PM   #5 (permalink)
Account Suspended
 
DJ_Guvana's Avatar
Join Date: Jun 2005
Posts: 518
DJ_Guvana is an unknown quantity at this point
 



You can do it the long way round and make sure people register befor they D/L the software. For this though you will need people to be constantly online. Prolly not the best idea, But hey, its one way of keeping your work under control
DJ_Guvana is offline  
Old 07-02-2005, 02:30 PM THREAD STARTER               #6 (permalink)
Awesome™
 
MasterB's Avatar
Join Date: May 2005
Location: Boston
Posts: 77
MasterB is on a distinguished road
 



Exactly the answer I needed deadserious. Works just like I needed . Help much appreciated.
MasterB is offline  
Closed Thread


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Redemption Grace Period TopNames.com Domain Newbies 1 07-31-2007 12:04 PM
PPC Domain Manager Script Now Available! Cyphix Scripts For Sale 8 04-01-2005 02:50 AM
Class Action Settlement Against Register.com IAmAllanShore Domain Name Discussion 8 03-01-2005 03:13 PM

Liquid Web Smart Servers  
All times are GMT -7. The time now is 02:38 PM.

Managed Web Hosting by Liquid Web
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