tibiz Posted May 24, 2007 Share Posted May 24, 2007 hello, I have a question, how to retrieve an address, f.e.: user type in browser: http://eshop.tibiz.net I need get this full string to identify the eshop from string. The problem is that I have a hosting without subdomains, so now if you type "eshop.tibiz.net" this is redirected to my starting location on hosting = www.tibiz.net. But if I can get the string from browser, I will redirect throught php to various subpages, fe: eshop.tibiz.net -> ./eshop diag.tibiz.net -> ./diagnsostics, etc... thank you very much for help Quote Link to comment https://forums.phpfreaks.com/topic/52842-how-to-retrieve-full-www-address-and-params-form-browser/ Share on other sites More sharing options...
trq Posted May 24, 2007 Share Posted May 24, 2007 Take a look at the $_SERVER array. Quote Link to comment https://forums.phpfreaks.com/topic/52842-how-to-retrieve-full-www-address-and-params-form-browser/#findComment-260874 Share on other sites More sharing options...
MadTechie Posted May 24, 2007 Share Posted May 24, 2007 i think you mean $_SERVER['SERVER_NAME']; EDIT: or $_SERVER['HTTP_HOST']; Quote Link to comment https://forums.phpfreaks.com/topic/52842-how-to-retrieve-full-www-address-and-params-form-browser/#findComment-260875 Share on other sites More sharing options...
trq Posted May 24, 2007 Share Posted May 24, 2007 Nope. I meant take a look at the $_SERVER array. Its holds all sorts of values that would help in this instance and Id'e prefer to point in the right direction rather than supply a working solution. Quote Link to comment https://forums.phpfreaks.com/topic/52842-how-to-retrieve-full-www-address-and-params-form-browser/#findComment-260883 Share on other sites More sharing options...
MadTechie Posted May 24, 2007 Share Posted May 24, 2007 Ahh Good point echo thorpe Quote Link to comment https://forums.phpfreaks.com/topic/52842-how-to-retrieve-full-www-address-and-params-form-browser/#findComment-260888 Share on other sites More sharing options...
tibiz Posted May 24, 2007 Author Share Posted May 24, 2007 thanx a lot , I've done it. now it works Quote Link to comment https://forums.phpfreaks.com/topic/52842-how-to-retrieve-full-www-address-and-params-form-browser/#findComment-260891 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.