natasha_thomas Posted August 20, 2010 Share Posted August 20, 2010 Folks, " http://www.example.com/whatever/whatever.htm " how to Grab the Domain name from URLs? like "http://www.example.com" Any suh PHP Cde? Quote Link to comment https://forums.phpfreaks.com/topic/211249-how-to-grab-the-domain-name-only-from-current-url/ Share on other sites More sharing options...
trq Posted August 20, 2010 Share Posted August 20, 2010 Will $_SERVER['SERVER_NAME'] suffice? Quote Link to comment https://forums.phpfreaks.com/topic/211249-how-to-grab-the-domain-name-only-from-current-url/#findComment-1101520 Share on other sites More sharing options...
natasha_thomas Posted August 20, 2010 Author Share Posted August 20, 2010 Hi, Ok i figured it out, i had to parse th edomain name form the URL. THanks a Lot! Quote Link to comment https://forums.phpfreaks.com/topic/211249-how-to-grab-the-domain-name-only-from-current-url/#findComment-1101608 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.