I made a page which is only accessible for specific ip addresses.
Code:
// IP's that are allowed.
$allow = array("123.456.7.89", "987.654.3.21"); //allowed IPs
if(!in_array($_SERVER['REMOTE_ADDR'], $allow) && !in_array($_SERVER["HTTP_X_FORWARDED_FOR"], $allow)) {
header("Location: http://www.google.com"); //redirect
exit();
}
But if I visit my localhost, I can't visit it because it says my ip is 0.0.0.0
What to fill in as allowed ip?