Store it either in a cookie (if it’s acceptable for your situation), or in a session variable.
session_start();
if ( !isset( $_SESSION["origURL"] ) )
$_SESSION["origURL"] = $_SERVER["HTTP_REFERER"];
More Related Contents:
- Determining Referer in PHP
- Notice: Undefined index: HTTP_REFERER
- PHP – Referer redirect script
- Is it possible to capture search term from Google search?
- recurring system my sql query [closed]
- Wysiwyg for dynamic blocks of content? [closed]
- How do I add PHP code/file to HTML(.html) files?
- PHP DOMDocument loadHTML not encoding UTF-8 correctly
- How to make a PHP SOAP call using the SoapClient class
- How can I select and upload multiple files with HTML and PHP, using HTTP POST?
- Using Jquery Ajax to retrieve data from Mysql
- Find the last element of an array while using a foreach loop in PHP
- Remove control characters from PHP string
- Deny direct access to all .php files except index.php
- Composer error: “PHP extension fileinfo is missing from your system”
- Strip all HTML tags, except allowed
- SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax — PHP — PDO [duplicate]
- TLS 1.2 not working in cURL
- Compile Error: Cannot use isset() on the result of an expression
- Fix incorrectly displayed encoding on an html document with php
- Interface or an Abstract Class: which one to use?
- PHP: Cookie domain / subdomain control
- Checking if a string contains an integer
- How do I enable PUT requests in Azure?
- Log the actual SQL query using ActiveRecord with Yii2?
- How do I loop through JSON array
- What is the safest way of passing arguments from server-side PHP to client-side JavaScript [duplicate]
- FTP upload file to distant server with CURL and PHP uploads a blank file
- Programmatically access currency exchange rates [closed]
- Read JSON Data Using PHP [duplicate]