WARNING: unlink(/home/users/web/b372/ipw.oxyscrip/public_html/public/templates_c///%%D3/D3C/D3CC9D33%%inc_leftbar.tpl.php.php) [function.unlink]: No such file or directory (on line 44 of file '/hermes/bosweb/web037/b372/ipw.oxyscrip/public_html/3rdparty/Smarty-2.6.11/libs/internals/core.write_file.php')
|
Main (PHP)
3rd Party Streams
Resources
Code Snippets
Affiliates
|
|
WARNING: unlink(/home/users/web/b372/ipw.oxyscrip/public_html/public/templates_c///%%AC/AC3/AC3C0EB5%%inc_awshead_item.tpl.php.php) [function.unlink]: No such file or directory (on line 44 of file '/hermes/bosweb/web037/b372/ipw.oxyscrip/public_html/3rdparty/Smarty-2.6.11/libs/internals/core.write_file.php')
|
| |
Function To Get The User's IP Address |
| By admin (2005-02-03. 8121 views.) |
Scans the environment variables and tries to use the one that's most likely to give a reliable result. |
|
<?php /**
* Call as: $userp = GetUserIP();
*/
function GetUserIP()
{
$ip = "";
if (isset($_SERVER))
{
if (isset($_SERVER["HTTP_X_FORWARDED_FOR"]))
{
$ip = $_SERVER["HTTP_X_FORWARDED_FOR"];
}
elseif (isset($_SERVER["HTTP_CLIENT_IP"]))
{
$ip = $_SERVER["HTTP_CLIENT_IP"];
}
else
{
$ip = $_SERVER["REMOTE_ADDR"];
}
}
else
{
if ( getenv( 'HTTP_X_FORWARDED_FOR' ) )
{
$ip = getenv( 'HTTP_X_FORWARDED_FOR' );
}
elseif ( getenv( 'HTTP_CLIENT_IP' ) )
{
$ip = getenv( 'HTTP_CLIENT_IP' );
}
else
{
$ip = getenv( 'REMOTE_ADDR' );
}
}
return $ip;
} ?>
|
| |
|
| |
|
|
|
|
|
|
|
|
Top Sponsor
Sponsors
Sponsors
Advertisting
Affiliates
|
|