// Setup from env
$requestIP = $_SERVER[ "REMOTE_ADDR" ];
if ( $_SERVER[ "HTTP_CLIENT_IP" ] )
{
$requestIP = $_SERVER[ "HTTP_CLIENT_IP" ];
}
else if ($_SERVER[ 'HTTP_X_FORWARDED_FOR' ] AND preg_match_all( "#d{1,3}.d{1,3}.d{1,3}.d{1,3}#s", $_SERVER[ 'HTTP_X_FORWARDED_FOR' ], $matches ) )
{
foreach ( $matches[0] as $IP )
{
// Chuck out RFC1918 IP
if ( !preg_match( "#^(10|172.16|192.168).#", $IP ) )
{
$requestIP = $IP; break;
}
}
}
else if ( $_SERVER[ "HTTP_FROM" ] )
{
$requestIP = $_SERVER[ "HTTP_FROM" ];
}
else if ( $_SERVER[ "HTTP_PROXY_USER" ] )
{
$requestIP = $_SERVER[ "HTTP_PROXY_USER" ];
}
]]>Nobody can do everything. As your business grows you will need to outsource some of the work. You could hire employees but those ongoing costs can eat up a lot of capital. What if you need a certain task this employee does not know how to do? Do it you…
]]>However, with the mass use of PHP 5, I believe it would be better practice to make use of Public, Private and Protected methods and variable definitions. Although that may have been outside the scope of this tutorial.
Great read though, very well explained ![]()
Years ago, when our oldest was a baby, we started a network marketing business. As you do, when you have a network marketing business, we used to play tapes in the car. As the kids got older, we had to negotiate alternating nursery rhyme tapes with the…
]]>” If you work hard on your job, you could make a living. If you work hard on yourself, you could make a fortune. Your income is primarily determined by your philosophy, not the economy. Success is something you attract by becoming an attractive perso…
]]>ISP’ s should not over sell capacity. Pulling the old‘ victim of our own success’ is a crock of shit. If you are going to sell an unlimited bandwidth high speed service, then the network should be able to cope with more than 5% of its users using…
]]>