This is a very simple programme that demonstrates how to block specified IP addresses from accessing the website or webpages. In this code I used an array to store the IP adresses but a database can also be used to store the IP adresses. You can redirect the user to a specified page or restrict it to specified pages or no access pages.