Welcome,
btw you could add a small flood protection so that people can't abuse this script. Perhaps also a little something to not do a whois x times in y seconds on the same person, or an amount of z people.
These are only suggestions though, it's your script
Cya