aWHOIS offers a nice PHP based interface for the nametoolkit WHOIS API (https://www.mashape.com/nametoolkit)