{"action":"created","issue":{"url":"https://api.github.com/repos/bcit-ci/CodeIgniter/issues/4243","labels_url":"https://api.github.com/repos/bcit-ci/CodeIgniter/issues/4243/labels{/name}","comments_url":"https://api.github.com/repos/bcit-ci/CodeIgniter/issues/4243/comments","events_url":"https://api.github.com/repos/bcit-ci/CodeIgniter/issues/4243/events","html_url":"https://github.com/bcit-ci/CodeIgniter/issues/4243","id":117049529,"number":4243,"title":"User agent library \"is_referral()\" not working","user":{"login":"murzid","id":4926456,"avatar_url":"https://avatars.githubusercontent.com/u/4926456?v=3","gravatar_id":"","url":"https://api.github.com/users/murzid","html_url":"https://github.com/murzid","followers_url":"https://api.github.com/users/murzid/followers","following_url":"https://api.github.com/users/murzid/following{/other_user}","gists_url":"https://api.github.com/users/murzid/gists{/gist_id}","starred_url":"https://api.github.com/users/murzid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/murzid/subscriptions","organizations_url":"https://api.github.com/users/murzid/orgs","repos_url":"https://api.github.com/users/murzid/repos","events_url":"https://api.github.com/users/murzid/events{/privacy}","received_events_url":"https://api.github.com/users/murzid/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-11-16T04:30:19Z","updated_at":"2015-11-16T11:06:21Z","closed_at":"2015-11-16T11:06:21Z","body":"In the past (CI2) it's work fine\r\n```php\r\npublic function is_referral()\r\n{\r\n\tif ( ! isset($_SERVER['HTTP_REFERER']) OR $_SERVER['HTTP_REFERER'] == '') {\r\n\t\treturn FALSE;\r\n\t}\r\n\treturn TRUE;\r\n}\r\n```\r\n\r\nBut in CI3 referer output always empty (false)\r\n```php\r\n$this->agent->is_referral()\r\n```\r\nSo i can't do it something like this\r\n```php\r\n// always false\r\nif ($this->agent->is_referral()) {\r\n\tredirect ( $this->agent->referrer() );\r\n} else {\r\n\tredirect('unknown');\r\n}\r\n```\r\nIt's always redirect to unknown. But URL is not empty (correct HTTP Referrer)\r\n```php\r\n// it's not empty\r\n$this->agent->referrer();\r\n```\r\nWhat's wrong? :confused: "},"comment":{"url":"https://api.github.com/repos/bcit-ci/CodeIgniter/issues/comments/156995819","html_url":"https://github.com/bcit-ci/CodeIgniter/issues/4243#issuecomment-156995819","issue_url":"https://api.github.com/repos/bcit-ci/CodeIgniter/issues/4243","id":156995819,"user":{"login":"narfbg","id":1058011,"avatar_url":"https://avatars.githubusercontent.com/u/1058011?v=3","gravatar_id":"","url":"https://api.github.com/users/narfbg","html_url":"https://github.com/narfbg","followers_url":"https://api.github.com/users/narfbg/followers","following_url":"https://api.github.com/users/narfbg/following{/other_user}","gists_url":"https://api.github.com/users/narfbg/gists{/gist_id}","starred_url":"https://api.github.com/users/narfbg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/narfbg/subscriptions","organizations_url":"https://api.github.com/users/narfbg/orgs","repos_url":"https://api.github.com/users/narfbg/repos","events_url":"https://api.github.com/users/narfbg/events{/privacy}","received_events_url":"https://api.github.com/users/narfbg/received_events","type":"User","site_admin":false},"created_at":"2015-11-16T11:06:21Z","updated_at":"2015-11-16T11:06:21Z","body":"Well, then please post your questions on the [forums](http://forum.codeigniter.com/) next time.\r\n\r\nAs I said, this is a bug tracker."}}