ajmZip Manager Tools for ASP

Sample code demonstrates how easy it is to use.

Retrieve Zip Code Information:
 	  
<!--#INCLUDE FILE="include\ajzipmgr.asp" -->
<%
 Set aj = New ajZipMgr
 On error Resume Next
 Set ajRec = aj.GetZipInfo(zip1)
 if Err.Number <> 0 then ErrorMsg = aj.lasterr
 .
 .
 .
 Response.Write (ajRec.Latitude)
 Response.Write (ajRec.Longitude)
%>

 

Retrieve distance between Zip Codes:
           
<!--#INCLUDE FILE="include\ajzipmgr.asp" -->
<%
 Set aj = New ajZipMgr
 On error Resume Next
 distance = aj.GetDistance(zip1, zip2);
     .
     .
     .
%> 
Retrieve Zip Codes within a radius:
           
<!--#INCLUDE FILE="include\ajzipmgr.asp" -->
<%
 Set aj = New ajZipMgr
 On error Resume Next
 radius = 10;  'radius in miles     
 ajRecords = aj.GetNearByZips(zip1,radius")
 For i = 1 to ajRecords.count
     Set ajRec = ajRecords.zip(i)
     Response.Write (ajRec.Distance)
     .
     .
     .
 Next 
%>            
   

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Copyright ©2004-2007 ajm Software, LLC. All Rights Reserved.

Back to our Home Page
Contact Us