umm... how are you banning people? by IP? by username?
Are you looking at using a database? Or will you use a CSV file?
I'll say this nicely: we aren't a script repository, so no-one will give you the code. We will help you step through the process of writing your script.
So once you answer these questions, start looking at the PHP Manual on strings and [man]echo[/man] and just in general how to use it (if you don't already know how).