You'll have to communicate with whois servers in order to retrieve the data. I downloaded this class a while ago and it works so check how it does it.