ASPDNS COM Component
 

ASPDNS is an ASP component that provides simple Domain Name Service (DNS) Lookups from your ASP pages. This simply means that the component can be used to resolve internet hostnames such as www.microsoft.com into their IP Addresses. Alternatively, it can be used to rseolve an IP Address (such as 196.15.200.26) into a fully qualified domain name.

The component is a form of freeware that I call donationware. It can be downloaded from here (1,473,840 bytes). If you have Visual Basic V5.0 SP3 runtimes already loaded on your system, you can download the bare DLL (19,456 bytes) by clicking here. You can then register it yourself using regsvr32.exe. If you are not fully conversant with component registration or are not sure if you have the required runtimes, rather download the full installation.

 
ASPDNS Component Properties & Methods
 
Function GetIPFromName(strHostName) As String GetIPFromName (strHostName) Retrieves the IP Address for a given hostname.
Function GetNameFromIP(strIPAddress) As String  GetNameFromIP (strIPAddress) Retrieves the FQDN for a given IP Address
 
Sample ASP Code for using the component
 
<%
   Dim DNS
   Dim A

   Set DNS = Server.CreateObject("ASPDNS.DNSLookup")
   A = DNS.GetIPFromName("www.hotbot.com")
   Response.Write "www.hotbot.com = " & A & "<BR>"
   A = DNS.GetNameFromIP("196.25.1.1")
   Response.Write "196.25.1.1 = " & A
   Set DNS = Nothing
%>
 
Downloads
 
Full Installation (Component + Runtimes) 1,473,840 bytes
Dynamic Link Library only 19,456 bytes
 
Revision History
 
April 9, 2000 Many people have written and asked about the functions not working well when
using a VBScript Variant. This is because the VBScript Variables are of type Variant
and ASPDNS is looking for a string. A quick fix is to simply typecast your VBScript
variable to string inside the function, i.e say

Response.Write DNS.GetNameFromIP(CStr(Request.ServerVariables("REMOTE_ADDR")))

The same applies to DNS.GetIPFromName. Hope that helps.
April 16, 1999 Fixed Long String Return Bug in GetNameFromIP and released V1.0.1
April 15, 1999 Initial Release V1.0.0
 
Donationware
 

As every programmer knows, a fair amount of time goes into developing a product. Programmers are normally nice guys but are not the sharpest business people. As a result, we tend to give away things for free. DONATIONWARE is my idea of letting you make a contribution if you feel that you would like to. So, if you like the software and feel that it saved you time, you can make a US$10 contribution. Or you can just use it for free and feel bad about it ;). Either way, the software is the same. It still works and it is not crippled. You will not receive a new super version of the component when you register. The free and the registered versions are the same. You do not HAVE to buy it, but if you want make a contribution, feel free to do so by clicking here or by clicking on the button below. Thanks ;)

Click here to make a donation via RegSoft.com
 
Disclaimer
 

This component is provided as is and without any guarantees or promises. You use it entirely at your own risk. It was written with care but cannot be certified to contain no bugs or errors. You also cannot hold me responsible if it crashes your server or starts World War III. Since it's free, I do not guarantee performance, support or error-free operation.

 
Contact Information
 

This Webpage was written in a great hurry, so please don't judge the component on the appearance of this page. One day when I grow up, I'll make a decent page. At least it is better than it predecessor... ;) .If you wish to mail me any comments, feel free to do so at stefan@internext.co.za

 
accesses since 15 April 1999