Hi, i webmaster multi sites and at the moment run php code to block unwanted ip addresses because of bad submittings.
I am running this code at the moment
<?php
$deny = array("159.224.160.42", "91.200.14.59", "146.0.74.205", "91.200.14.59", "5.39.219.26", "91.232.96.8", "216.151.137.34", "216.151.137.35", "216.151.137.36", "213.238.175.4", "91.232.96.2", "188.92.75.82", "91.207.7.141");
if (in_array ($_SERVER['REMOTE_ADDR'], $deny)) {
header("location: http://www.cnn.com/");
exit();
} ?>
The problem is that each time i want to block a person i have to add their ip address to all the index.php.
I would like to run this code but get the ip addresses from a single site, my main site.
Please help me with what the file would look like on my site, how i would read it in so that the array would look like the above.
Thanks
Warren