woocha Posted January 15, 2008 Share Posted January 15, 2008 Is there anyway to read the address bar for instance if the address bar shows this in the brower: http://search.ebay.com/ws/search/SaleSearch?sofocus=bs&satitle=chicken+cheese&sacat=-1%26catref%3DC5&fbd=1&dfsp=1&_trksid=m37&from=R6&nojspr=y&pfid=0&fswc=1&few=&saprclo=&saprchi=&fss=0&saslop=1&sasl=&fls=4%26floc%3D1&sargn=-1%26saslc%3D0&salic=1&saatc=1&sadis=200&fpos=18951&fsct=&sacur=0&sacqyop=ge&sacqy=&sabfmts=0&saobfmts=exsif&ftrt=1&ftrv=1&sabdlo=&sabdhi=&saaff=afdefault&afcj=&afmp=&fsop=1%26fsoo%3D1&fcl=3&frpp=50 essentially, I would like to have the address turned into a variable. Quote Link to comment https://forums.phpfreaks.com/topic/86139-read-the-url-from-the-address-bar/ Share on other sites More sharing options...
trq Posted January 15, 2008 Share Posted January 15, 2008 if the address bar showed that in the url you wouldn't be on your site would you. Anyways, you'll want to look at the $_SERVER array globals. In particular $_SERVER['HTTP_HOST'] and $_SERVER['REQUEST_URI']. Quote Link to comment https://forums.phpfreaks.com/topic/86139-read-the-url-from-the-address-bar/#findComment-439904 Share on other sites More sharing options...
woocha Posted January 15, 2008 Author Share Posted January 15, 2008 No...That wouldn't be my server...that's Ebay, but the point was made just the same. There are a lot of extra things in that URL: sofocus=bs &satitle=chicken this URL just made the point for me..... Thank you for the response though. I am not familiar with $_SERVER['HTTP_HOST'] and $_SERVER['REQUEST_URI'], but I will go to php.net and check them out. Thank you Quote Link to comment https://forums.phpfreaks.com/topic/86139-read-the-url-from-the-address-bar/#findComment-439922 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.