How to send XML Rquest to http://geocoder.us/

J

JK

Can anyone provide me with an ASP 2.0 example of how to call the geocoder
service. They provide the following perl example for XML-RPC :

#!/usr/bin/perl

use XMLRPC::Lite;
use Data::Dumper;
use strict;
use warnings;

my $where = shift @ARGV
or die "Usage: $0 \"111 Main St, Anytown, KS\"\n";

my $result = XMLRPC::Lite
-> proxy( 'http://rpc.geocoder.us/service/xmlrpc' )
-> geocode( $where )
-> result;

print Dumper $result;
 
M

McKirahan

JK said:
Can anyone provide me with an ASP 2.0 example of how to call the geocoder
service. They provide the following perl example for XML-RPC :

#!/usr/bin/perl

use XMLRPC::Lite;
use Data::Dumper;
use strict;
use warnings;

my $where = shift @ARGV
or die "Usage: $0 \"111 Main St, Anytown, KS\"\n";

my $result = XMLRPC::Lite
-> proxy( 'http://rpc.geocoder.us/service/xmlrpc' )
-> geocode( $where )
-> result;

print Dumper $result;

Below are three forms using just HTML.
Of course, it could be converted to ASP.

<html>
<head>
<title>geocoder.htm</title>
</head>
<body>
<b>geocoder.us -- find the latitude & longitude of any US address</b>
<hr>
Username and Password not required for the demo.
<br>
<form action="http://rpc.geocoder.us/demo.cgi" method="post">
<input type="text" name="address" size="50"
value="1600 Pennsylvania Ave, Washington, DC">
<input type="submit" value="Submit">
</form>
<hr>
Username and Password not included but will be requested..
<br>
<form method="post"
action="http://geocoder.us/member/service/xmlrpc">
<input type="text" name="geocode" size="50"
value="1600 Pennsylvania Ave, Washington, DC">
<input type="submit" value="Submit">
</form>
<hr>
Username and Password included but must be changed to yours.
<br>
<form method="post"
action="http://Username:[email protected]/member/service/xmlrpc">
<input type="text" name="geocode" size="50"
value="1600 Pennsylvania Ave, Washington, DC">
<input type="submit" value="Submit">
</form>
<hr>
</body>
</html>

The last one (even with the made up Username and Password)
opens a page which states:

geocoder.us
find the latitude & longitude of any US address - for free
----------------------------------------------------------------------------
----
Payment Required
Your account does not have sufficient credits to use this feature.
Please visit your account page to purchase more credits.

I guess "free" does not mean "free"!
 
M

McKirahan

JK said:
Can anyone provide me with an ASP 2.0 example of how to call the geocoder
service. They provide the following perl example for XML-RPC :

#!/usr/bin/perl

use XMLRPC::Lite;
use Data::Dumper;
use strict;
use warnings;

my $where = shift @ARGV
or die "Usage: $0 \"111 Main St, Anytown, KS\"\n";

my $result = XMLRPC::Lite
-> proxy( 'http://rpc.geocoder.us/service/xmlrpc' )
-> geocode( $where )
-> result;

print Dumper $result;

Do you need the map or just the data?

The following will return the CSV (Comma Seperated Values) result:
38.898748,-77.037684,1600 Pennsylvania Ave NW,Washington,DC,20502

<html>
<head>
<title>geocoder.htm</title>
</head>
<body>
<b>geocoder.us -- find the latitude & longitude of any US address</b>
<hr>
Username and Password not required.
<br>
<form action="http://rpc.geocoder.us/service/csv" method="post">
<input type="text" name="address" size="50"
value="1600 Pennsylvania Ave, Washington, DC">
<input type="submit" value="Submit">
</form>
<hr>
</body>
</html>
 
M

McKirahan

JK said:
Thanks for the reply. Alas, i do need the ASP code to get this working - not
HTML

[snip]

What do you need ASP code for:
1) Submitting the form and/or
2) Retrieving the results?

How is the "address" entered in the form:
manually by the user or from a database or ...?

What do you want to do with the results?

Also, you didn't answer my question (below).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top