To get referrer url, we are going to use $_SERVER variable called HTTP_REFERER.
In some cases we need to check, this page redirected from where? To fill up that "where" we should use $_SERVER[HTTP_REFERER].
NOTE:
So, to get full referrer URL in your PHP page, we need to use,
Related Post : How to get current full URL in PHP
In some cases we need to check, this page redirected from where? To fill up that "where" we should use $_SERVER[HTTP_REFERER].
NOTE:
- If users use a bookmark or directly visit your site by manually typing in the URL, HTTP_REFERER will be empty.
- If the users are posting to your page programatically (CURL) then they're not obliged to set the HTTP_REFERER as well.
So, to get full referrer URL in your PHP page, we need to use,
echo $_SERVER[HTTP_REFERER];
Have any doubt, feel free to comment here!Related Post : How to get current full URL in PHP
To get referrer url, we are going to use $_SERVER variable called HTTP_REFERER.
In some cases we need to check, this page redirected from where? To fill up that "where" we should use $_SERVER[HTTP_REFERER].
NOTE:
So, to get full referrer URL in your PHP page, we need to use,
Related Post : How to get current full URL in PHP
In some cases we need to check, this page redirected from where? To fill up that "where" we should use $_SERVER[HTTP_REFERER].
NOTE:
- If users use a bookmark or directly visit your site by manually typing in the URL, HTTP_REFERER will be empty.
- If the users are posting to your page programatically (CURL) then they're not obliged to set the HTTP_REFERER as well.
So, to get full referrer URL in your PHP page, we need to use,
echo $_SERVER[HTTP_REFERER];
Have any doubt, feel free to comment here!Related Post : How to get current full URL in PHP
No Comment