<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META content="MSHTML 5.00.2614.3500" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Does anyone know of an online geo-coding
service.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>i.e. they have an address form press submit and
back comes the geo-code.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>I may process 10-1000 GeoCodes a day and need it in
realtime. I've scene some sites that allow you to do 100 free geo-codes,
but would like to use a subscription type service.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>I am planning to write a script that connects to
their web page, posts the data to a form, captures the returned
geo-code and then update my database record. Another wonderful job
for PERL.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>
<DIV><FONT face=Arial size=2>Thanks</FONT></DIV>
<DIV><FONT face=Arial size=2>Steve Lehr</FONT></DIV></FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>For those of you have not done such a thing-- here
a nifty script that POSTS/GETS data from a web form.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>#!/usr/bin/perl -w<BR>use Socket;<BR>use
strict;<BR># these are the only pertinent variables<BR>my $ip
="www.wherver.com";<BR>my $path = "geocode.pl";<BR>my $content =
"CMD=geoCode&Address=123+Seaseme+St&";</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>my ($sec, $min, $hour, $mday, $mon, $year, $wday,
$yday, $isdst) = localtime(tim<BR>e);<BR>my $timestr =
sprintf("%4d%02d%02d%02d%02d", $year+1900, $mon+1, $mday, $hour, $<BR>min);
</FONT></DIV>
<DIV><FONT face=Arial size=2>my $host = $ip;<BR>my $port = 80;<BR>my
$socketaddr;<BR></FONT><FONT face=Arial size=2><BR>print HTML "\nRetrieving page
$path with $content";</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>print "\nRetrieving page $path with
$content";<BR>openSock();<BR>post ($content);<BR>@wholePage =
<SOCK>;<BR>close SOCK;<BR>print HTML @wholePage;</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>exit;</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>###########<BR># subroutine: open a socket at
SOCK<BR>###########</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>sub openSock {<BR>$socketaddr= sockaddr_in $port,
inet_aton $host or die "Bad hostname\n"; </FONT></DIV>
<DIV><FONT face=Arial size=2>#print "Connecting to $socketaddr $host,
$port";<BR>socket SOCK, PF_INET, SOCK_STREAM, getprotobyname('tcp') or die "Bad
socket\n";<BR>connect SOCK, $socketaddr or die "Bad
connection\n";<BR>select((select(SOCK), $| = 1)[0]);<BR>}</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2><BR>###########<BR># subroutine: send post request
to target web site<BR>###########</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>sub post {</FONT></DIV>
<DIV><FONT face=Arial size=2>my $content = shift @_;<BR>print SOCK "POST <A
href="http://$host/$path">http://$host/$path</A> HTTP/1.0\n";<BR>print SOCK
"Content-type: application/x-www-form-urlencoded\n";<BR>my $contentLength =
length $content;<BR>print SOCK "Content-length: $contentLength\n";<BR>print SOCK
"\n";<BR>print SOCK "$content";<BR>}</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>sub get {</FONT></DIV>
<DIV><FONT face=Arial size=2>my $content = shift @_;<BR>print SOCK "GET <A
href="http://$host/$path">http://$host/$path</A> HTTP/1.0\n";<BR>print SOCK
"Content-type: text/html\n\n";<BR>#my $contentLength = length
$content;<BR>#print SOCK "Content-length: $contentLength\n";<BR>#print SOCK
"\n";<BR>#print SOCK "$content";<BR>}
</FONT></DIV>
<DIV> </DIV>
<DIV> </DIV></BODY></HTML>