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.
You can block ips/networks by using iptables /Apf iptables -A INPUT -s <Source IP> -j DROP If you have apf then just add the ips which you want to block in the file /etc/apf/deny_hosts.rules
Go for some small cgi scripting that would initiate a system command using sudo so that it will be issuing a system command after obtaining the ip address of visitors through the environment variable.