First of all, understand that not all IP's are associated with host names. Host names are a function of <b><u>Domain</u><u>Name</u><u>Services</u></b>. They are a convenience, not a requirement of the IP protocol. It is perfectly legitimate to get an assigned IP and then put up a web page without a domain. People can then access that page directly by using the IP (ex http://192.148.20.101/).
Even if the IP does have a domain associated with it, your ability to determine that domain is dependent upon your DNS server and all the DNS servers along the path to the IP having <b>Reverse DNS</b> entries in their databases. This, also, is not a requirement.
In short (too late) you may not be able to get a domain for an IP for a host (no pun intended) of reasons.
The best you could do is to search the Internic registry to find out to whom a class (block) of IP's is reserved for. Even this is sometimes not helpful. One company may have reserved a big class A block and then sub-leased lower class B, C, or single IP's to other company's or users.
I know this is not an answer to your problem, but it is an explaination.
HTH
-- Rich