Referral URL in php

xboxdudex92

New Member
So I am trying to get the page where a visitor came from. I inserted this code into a php file and I am trying to see the page's URL but it is not working, any suggestions?\[code\]<?php $ref = getenv("HTTP_REFERER"); echo $ref; ?>\[/code\](added this after some answers)I have also tried\[code\]print $_SERVER["HTTP_REFERER"];\[/code\]and that doesn't work eitherit worked after i updated the website many times, not sure why was there a problem in the first place, thanks anyway :)
 
Back
Top