-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathClient.php
More file actions
37 lines (35 loc) · 848 Bytes
/
Client.php
File metadata and controls
37 lines (35 loc) · 848 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?php // vim:ts=3:sts=3:sw=3:et:
/**
* Client data utility
*
* PHP Version 5
*
* @category PHP
* @package MindFrame2
* @author Bryan C. Geraghty <bryan@ravensight.org>
* @copyright 2005-2011 Bryan C. Geraghty
* @license http://www.gnu.org/licenses/lgpl-3.0.txt GNU LGPL
* @link https://github.com/archwisp/MindFrame2
*/
/**
* Client data utility
*
* @category PHP
* @package MindFrame2
* @author Bryan C. Geraghty <bryan@ravensight.org>
* @license http://www.gnu.org/licenses/lgpl-3.0.txt GNU LGPL
* @link https://github.com/archwisp/MindFrame2
*/
class MindFrame2_Client
{
/**
* Fetches the remote client's address
*
* @return string
*/
public static function fetchIpAddress()
{
return isset($_SERVER['REMOTE_ADDR'])
? $_SERVER['REMOTE_ADDR'] : '127.0.0.1';
}
}