Skip Navigation 
NOAA logo - Click to go to the NOAA homepage National Weather Service   NWS logo - Click to go to the NWS homepage    
Western Region Headquarters
navigation bar decoration      
Regional Divisions
 is the U.S. government's official web portal to all federal, state and local government web resources and services.
getprod.php Help Section

getprod.php is the main script to pull any NWS product from the web. This script is the default method for all of Weatern Region.

  • Backwards compatible with getprod.php (wr) and product.php (nws/cr)
  • Automatically adds clickable hyperlinks to any webaddress
  • Automatically adds clickable hyperlinks to any nine letter product pil from specified wfo
  • Easily parses products in a variety of ways
  • Adds definition links and tooltips to key terms
  • Provides a fix to the problem of different offices issuing products with same pil (click here)
  • Easily toggle features off or on if so desired (click here)
  • Easily create RSS/XML feeds of single or multiple products (click here)
  • Gives user font size options

  • How Do I?

    Display a product?

    A product can be called in one of two ways:
  • By using the 6 or 9 letter &afos (AAABBBCCC or AAABBBCCC) input variables
    Examples: 1
  • By using the 3 letter &pil or &product (AAABBBCCC) and 3 letter &sid or &issuedby (AAABBBCCC) input variables
    Examples: 1 2

  • * Note, the 3 letter node (&node=AAA or &prod=AAABBBCCC) is optional. Examples: 1 2
    * Note, the &prod input variable used in the old version of getprod.php still works, it is now an alias to &afos. In other words, any old links will NOT need to be changed

    Parse a product?

    Parsing allows you to display only a segment of the product containing a specific string.
    By default, segments are defined by text between '$$'. If you want to use '&&' as the segment boundaries, use the input variable '&parse2' instead of '&parse'
    This can be used for any product, and is achieved in a number of ways:
  • Fast Method - Use the product node to call up a single parsed zone
    By node portion of 9-letter &afos (AAABBBCCC) input variable
    Examples: 1
  • Use the &parse input variable for a single zone (using a three digit code)
    Examples: 1
  • Use the &parse input variable for multiple zones (using three digit codes seperated by commas)
    Examples: 1
  • Use the &parse input variable for parsing out sements with any unique string (substitute spaces with underscores). Mulitple search words can be used, separated by a comma.
    This can be used to display any synopsis-like segments in addition to a parsed zone (see example 3)
    Examples: 1 2 3
  • Use the &parse2 input variable for parsing out sements with any unique string. This functions exactly the same as the example above, but uses '&&' as the boundaries for segments, instead of '$$'
    Examples: 1

  • * Note: All Parsing is designed to handle zone combinations like CAZ044-045-046 and CAZ044<046
    * Note: When using a comma seperated list of searches, segments will be displayed if it contains ANY (not ALL) of the parameters.

    Display only versions with specific string?

    Many uses available. Can be used to fix issue of different offices issuing same pil. Can also fix problem of multiple products under same pil (like SPS).
  • Use the &search input variable to display only product versions containing a unique string (substitute spaces with underscores)
    Examples: 1 LOX STO

  • Turn off/on features?

    All these features are great, but sometimes they don't work properly or they are not desired. You have the option to toggle off the default.
  • Use the &toggle input variable to toggle off features that are on by default...or turn off features that are off by default
    Multiple toggles are available with comma seperation
    - linkproducts: Automatically make 9-letter product ids clickable links (default:on)
    - linkurls: Automatically make 'http://' or '' or' address clickable links (default:on)
    - dictionary: Automatically make links and tooltips to key terms (default:off except on for AFD pil)
    - taf: Automatically add recent mtr observations (when available) (default:off)
    - mobile: Make product friendly for mobile web devices(default:off)
    - textonly: Make product pure text only (default:off)
    Examples: Default Toggled Mobile TextOnly

  • Create RSS/XML Feeds?

    Create an RSS/XML feed of a single product, or multiple products highlighting the latest update time.
  • Simply add &xml to the end of the URL to turn on the XML feed option (or simply use the link associated with the icon)
  • To create a feed of multiple products, list the product id codes (separated by a comma) and assign it to the &afos input. Don't forget to add the &xml to the URL to turn on the feed.
  • There are muliple tags in the feed (simply view source on one to see what's inside). Do note that the entire product can be found in the tag

  • Examples: Single Product Multiple Products

    US Dept of Commerce
    National Oceanic and Atmospheric Administration
    National Weather Service
    Western Region Headquarters
    125 South State Street
    Salt Lake City, UT 84138-1102

    Information Quality
    Privacy Policy
    Freedom of Information Act
    About Us
    Career Opportunities