![]() |
$_SERVER['HTTP_REFERER'] not working using codeigniter - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: $_SERVER['HTTP_REFERER'] not working using codeigniter (/showthread.php?tid=48314) |
$_SERVER['HTTP_REFERER'] not working using codeigniter - El Forum - 01-11-2012 [eluser]Unknown[/eluser] Hi All, quiet new to Codeigniter so apologies if i am being dumb (i have also tried searching for this) I am trying to set-up a system where 3rd party sites can interact with my Codeigniter site but I need a way of grabbing their domain. Here is a test I conducted to try and get it working. I created a 3rd party page called mydomain.com/index.php and added this code Code: echo file_get_contents('http://myotherdomain.com/'); I created an non Codeigniter script at myotherdomain.com/index.php and added this code Code: echo $_SERVER['HTTP_REFERER']; Then if i browse mydomain.com/index.php I get 'mydomain.com/index.php' But if I install a fresh copy of Codeigniter 2.1.0 at myotherdomain.com and alter the welcome controller to Code: public function index() and then browse mydomain.com/index.php neither $_SERVER or agent->referrer() return anything. Any ideas (i am sure I have missed something really simple)? |