I
I
idkiberlord0772018-03-25 09:42:55
PHP
idkiberlord077, 2018-03-25 09:42:55

How to get the previous URI?

I work with the analysis of user data on the site. You need to find out which link the user was on before he ended up on the real one. It's not difficult to get a link to which one it is now (I use $_SERVER['REQUEST_URI']), but I don't know how to get a preliminary one.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Anatoly Medvedev, 2018-03-25
@balamyt92

$_SERVER['HTTP_REFERER']

A
Andrey, 2018-03-25
@VladimirAndreev

At the time of clicking on the link, a request is made to the server, and its address is the request_uri

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question