The netgeo.cgi form can be used as a regular CGI form by loading the form into a browser, filling in the fields, then clicking the Submit button to post the data. Alternatively the form can be used by building and sending a URL with query string for an HTTP GET, e.g.: http://netgeo.caida.org/perl/netgeo.cgi? target=caida.org,sdsc.edu&method=getRecord&nonblocking=true The target strings can be AS numbers, with or without the leading "AS", pretty much the same as when using the NetGeo module. AS number expressions typed in to the text area of the netgeo.cgi form may contain embedded spaces, but when supplied as part of a GET query string they must be tokens. "AS 234" is acceptable when typed in to the text area on the form, but cannot be used in a GET query string (instead use "AS234" or "234"). Target strings may be domain names or IP addresses in dotted decimal format. You may include several targets in a single GET query string; use commas between the identifiers: caida.org,sdsc.edu,AS234,235,192.172.225.15,132.249.40.200 As this example shows, you may mix different types of target strings in a single query. Target strings in the text area on the form may be separated by commas or newlines. If the method is getRecord a version line will be printed once at the top of the results, e.g., "VERSION=1.0". This is not shown for the other methods because it is assumed it will not be needed there, the lists of key/values shown for getCountry and getLatLong is expected to be stable. The allowed values for the method keyword are getRecord, getCountry, getLatLong, and getWhoisText. If you don't specify a method name it defaults to getRecord. All methods return a block of : lines for each input target, with a blank line separating the blocks. The first keyword in each block is always IDENTIFIER, which will be the domain name, IP address, or AS number. Except for getWhoisText, the last line in each block will be STATUS. The examples below show the order of the lines in each type of block. ----Text returned by getRecord---- IDENTIFIER: caida.org NAME: CAIDA.ORG NUMBER: CITY: LA JOLLA STATE: CALIFORNIA COUNTRY: US LAT: 32.85 LONG: -117.25 LAT_LONG_GRAN: C LAST_UPDATED: 11-Jul-98 NIC: INTERNIC LOOKUP_TYPE: Domain Name RATING: STATUS: OK ----Text returned by getCountry---- IDENTIFIER: caida.org COUNTRY: US STATUS: OK ----Text returned by getLatLong---- IDENTIFIER: caida.org LAT: 32.85 LONG: -117.25 STATUS: OK ----Text returned by getWhoisText---- IDENTIFIER: caida.org CAIDA (CAIDA-DOM) UC, San Diego La Jolla, CA 92093 US Domain Name: CAIDA.ORG ... Note that there is no keyword printed for the whois text. The text returned from the whois server is printed on the line following the IDENTIFIER key/value pair. If you don't want to specify nonblocking in a GET query string then don't include the nonblocking keyword at all. The default is for nonblocking to be OFF, i.e., the result will block until a whois lookup is completed, if needed. If you want results immediately after a database lookup, specify nonblocking=true, or nonblocking=on, or nonblocking=1; these are all equivalent. If nonblocking is specified a separate thread will be started for the whois lookups of any targets not found in the database. You'll need to query the database periodically to check for the results. Examples -------- 1) To display the NetGeo form for interactive use, point your browser to: http://netgeo.caida.org/perl/netgeo.cgi 2) To lookup the domain names "caida.org" and "sdsc.edu" via an HTTP GET query string, enter the following string into your browser or send it directly in a GET request to ipn port 80. Note that no method name is specified so this will default to getRecord. http://netgeo.caida.org/perl/netgeo.cgi?target=caida.org,sdsc.edu 3) Same as (2) but only lookup the lat/long values for the two targets. http://netgeo.caida.org/perl/netgeo.cgi?target=caida.org,sdsc.edu& method=getLatLong 4) Same as (3) but return immediately after looking up the targets in the database. Any targets not found in the database will be looked up in whois servers on a separate thread. The results of the lookups on the separate thread will be available sometime later, and will require a subsequent query to netgeo.cgi to get the new values from the database. http://netgeo.caida.org/perl/netgeo.cgi?target=caida.org,sdsc.edu& method=getLatLong&nonblocking=true