zipinfo
zipinfo
ZIP
,
ZIPINFO

The zipinfo statement queries the web to obtain information about a zip code.

Parameters

This statement has two parameters:

zip – Five digit zip code.

zipinfo – field or variable that will be filled with a dictionary containing information about the zip code (see discussion below).

Description

This statement queries the web to obtain information about a zip code. The information is returned in a dictionary that will contain one or more of the values listed below:

    CITY ☞ The primary name of the city associated with this zip code
    STATE ☞ Name of the state this zip code is in
    COUNTY ☞ Name of the county associated with this zip code
    FIPS ☞ FIPS code
    AREACODE ☞ Primary area code associated with this zip code
    TIMEZONE ☞ Time zone
    DAYLIGHTSAVINGS ☞ Yes/No
    LATITUDE ☞ Geographic co-ordinates of center of zip code
    LONGITUDE ☞ Geographic co-ordinates of center of zip code
    MSA ☞ Metropolitan statistical area

This example displays the city and state associated with a zip code

    local z5,zinfo
    z5=""
    gettext "Zip Code:",z5
    zipinfo z5,zinfo
    message z5+": "+getdictionaryvalue(zinfo,"CITY")+", "+getdictionaryvalue(zinfo,"STATE")

See Also

- encodehttppostdata( -- converts a dictionary into HTTP post data.
- info("httpheaders") -- returns a dictionary with information about a just completed HTTP download.
- info("urltaskinfo") -- returns information about a just completed HTTP download.
- ipaddress -- returns the current IP address of the computer, or "" if not connected.
- loadurl -- loads a resource from the internet.
- loadurl( -- loads a resource from the internet.
- posturl -- loads a resource from the internet, with form data.
- posturl( -- loads a resource from the internet, with form data.
- url( -- synchronously loads a resource from the internet.
- urltask( -- asynchronously loads a resource from the internet.
- urltaskcancel -- aborts a download initiated with the urltask( function.
- urltaskstatus -- enables connection error checking in urltask( completion code.
- zipinfoplus -- queries the web to obtain information about a zip code.

History

Version | Status | Notes
10.0 | No Change | Carried over from Panorama.