What’s the best way to detect referrer?

I’ve been searching for some WP specific way to detect any referrer. Have an idea?
I know how to do that in PHP but I just want to know if there’s some WP function to do that?

EDIT: here is what I ‘m trying to test =>

$referer = wp_get_referer();
if (  strpos($referer ,'http://wordpress.org') !== false ) echo 'you come from wordpress.org';

Related posts

3 comments

  1. use wp_get_referer(); to Retrieve referer from ‘_wp_http_referer’, HTTP referer, or current page respectively. for more info read codex

Comments are closed.