They contacted me and said they have a white list of ip addresses to thier servers that they will be making requests from...
I need to block any website that tries to use thier account based on these ip addresses...
basically if the request comes in and doesn't match the ip addresses listed on the clients account it will return an image that shows,"Domain does not match client, IP address has been recorded, mywebsite.com!"
Im using PHP Version 4.2.3, System Windows NT 5.1 build 2600, Build Date Oct 5 2002 15:06:37, Server API Apache Virtual Directory Support enabled Configuration File (php.ini) Path C:\WINDOWS\php.iniDebug Build noThread Safety enabled
Heres some code im using to try to get the block to work below :
Code: Select all
$ip = gethostbyname($_SERVER['HTTP_HOST']);
if (trim($ip) == '') { $ip = $_SERVER['HTTP_CLIENT_IP']; }
if (trim($ip) == '') { $ip = $_SERVER['HTTP_X_FORWARDED_FOR']; }
if ($ip != '68.178.254.126' or $ip != '76.121.38.240') {
sorry();
} else {
start();
}