Welcome Guest, Not a member yet? Register   Sign In
Accept request from my app only
#2

[eluser]Colin Williams[/eluser]
You don't need CI's help (but it is there)

Plain PHP

Code:
$ip = $_SERVER['REMOTE_ADDR'];
$domain = $_SERVER['SERVER_NAME'];

With CI:

Code:
$ip = $this->input->server('REMOTE_ADDR');
$domain = $this->input->server('SERVER_NAME');

I'm not sure to what degree either of these can be spoofed, but you might want to research that.


Messages In This Thread
Accept request from my app only - by El Forum - 09-18-2008, 10:30 PM
Accept request from my app only - by El Forum - 09-19-2008, 12:23 AM
Accept request from my app only - by El Forum - 09-19-2008, 12:53 AM
Accept request from my app only - by El Forum - 09-19-2008, 07:34 AM
Accept request from my app only - by El Forum - 09-19-2008, 08:14 AM
Accept request from my app only - by El Forum - 09-19-2008, 09:15 PM
Accept request from my app only - by El Forum - 09-20-2008, 11:39 AM



Theme © iAndrew 2016 - Forum software by © MyBB