如何知道用户从哪个URL重定向到php中我们网站的页面

I have written a webservice client connected to a bank address. After the user is being sent to the bank's website and completes the from, then automatically is being redirected to the page named callback.php

Now, I want to know that from which address the user is being redirected to callback page?! Is there a way to know it through PHP and of course if possible in codeigniter?!

You should be able to access the referring location (if the user's browser has sent it, that is), with the following variable $_SERVER['HTTP_REFERER']

This should be accessible to you regardless of framework.

There is no 100% way to solve this ...

You can try to use the Referer which was sent .. .but this result can be manipulatet or edited by user/browser etc...

<?php 
    $_referer = $_SERVER["HTTP_REFERER"]; 
 ?>

Codeigniter has it own user agent class

CI3 http://www.codeigniter.com/user_guide/libraries/user_agent.html

As per what user guide said.

if ($this->agent->is_referral())
{
   echo $this->agent->referrer();
}

CI2 http://www.codeigniter.com/userguide2/libraries/user_agent.html