CodeIgniter Forums
Grabbing host address... - 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: Grabbing host address... (/showthread.php?tid=18296)



Grabbing host address... - El Forum - 05-01-2009

[eluser]internut[/eluser]
Hey all...

Is this the best way:

$this->input->server(HTTP_HOST)

using:

$this->input->ip_address()

to grab IP.


Grabbing host address... - El Forum - 05-02-2009

[eluser]slowgary[/eluser]
Whatever happened to good ole'
Code:
$_SERVER['REMOTE_ADDR'];
?


Grabbing host address... - El Forum - 05-02-2009

[eluser]Phil Sturgeon[/eluser]
Same thing. The server method of Input just returns false if the key doesnt exist and allows XSS cleaning.