what I am trying to do is block an ip after they go to my website, so once a person comes across my site has a look around or even just one page, and then leaves they are blocked and cannot come back a second time. so basically A log would be made with all the user ip's that hit my website that become blocked. I have tried to have a look around on the web but haven't had much luck. I am not a programmer and usually just try to pick it up as I go along, any help would be much appreciated.
If you are using Cpanel go to Cpanel > Ip Deny Manager... to add the Ip you want to block (This feature will allow you to block a range of IP addresses to prevent them from accessing your site. You can also enter a fully qualified domain name, and the IP Deny Manager will attempt to resolve it to an IP address for you. )
I don't see any *ready* automated script can do for you. You might want to hire someone to write for you. IPtables or IP Deny Manager mentioned above require you do it manually, and you will need to have the IP list in hand
You can do this using some simple perl scripts that will run a system command to block the ip and also get the ip address through some environment variables.