What are the different methods to display the referrer using PHP?

To display the referrer using PHP, you can use the $_SERVER['HTTP_REFERER'] superglobal variable. This variable contains the URL of the page that referred the current page. You can then display this information to the user by echoing it out in your PHP code.

<?php
if(isset($_SERVER['HTTP_REFERER'])) {
    echo "Referrer: " . $_SERVER['HTTP_REFERER'];
} else {
    echo "No referrer information available.";
}
?>