In other words a script that can help me redirect traffic according to countries .
Post links if u have , thanks
Post links if u have , thanks

BinarySearch(A[0..N-1], ip) {
low = 0
high = N - 1
while (low <= high) {
mid = (low + high) / 2
if (ip <= A[mid].EndIp) {
if (ip >= A[mid].StartIp) {
return true;
} else {
high = mid - 1;
}
} else {
low = mid + 1
}
}
return false
}

Comment