Hello,
I need to get the page url, e.g.
http://www.sekataplus.com/product_detai ... 0864fad1d7
I am using 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], but it just capture the http://www.sekataplus.com.
How can i solve this?
How to get page url?
Moderator: General Moderators
Re: How to get page url?
That works fine by me when testing. REQUEST_URI returns the GET request so that should be it. Do you have any more code snippet on which page you're trying to capture it from etc.
Re: How to get page url?
The code works fine when i am in localhost, but when i put it into live server, it just can capture the server.SvanteH wrote:That works fine by me when testing. REQUEST_URI returns the GET request so that should be it. Do you have any more code snippet on which page you're trying to capture it from etc.
Re: How to get page url?
What exactly are you trying to use this for?
Re: How to get page url?
SvanteH wrote:What exactly are you trying to use this for?
I need capture the url and store it into database in order to record the visitor hit for this page!
Re: How to get page url?
Sounds very odd if your production server fails to put any values into $_SERVER["REQUEST_URI"] to be honest.
Re: How to get page url?
SvanteH wrote:Sounds very odd if your production server fails to put any values into $_SERVER["REQUEST_URI"] to be honest.
Thanks a lot, i got the solution. I just put $_SERVER['QUERY_STRING']