If you absolutely know the ranges of valid IP Addresses, you could do something like:
function ip2number($IP) {
$parts = explode('.', $IP);
if(count($parts) != 4) return 0;
return ($parts[3] + $parts[2] * 256 + $parts[1] * 256 * 256 + $parts[0] * 256 * 256 * 256);
}
$num = ip2number($_SERVER['REMOTE_ADDR']);
if($num >= ip2number('207.209.7.0') && $num <= ip2number('207.209.7.255')) {
echo "Valid";
}
Like Brad says though, it isn't guaranteed and there are ways around it, and you will have to keep up to date of the valid IP Address ranges.