Source for file DMA.php
Documentation is available at DMA.php
// +----------------------------------------------------------------------+
// +----------------------------------------------------------------------+
// | Copyright (C) 2004 MaxMind LLC |
// +----------------------------------------------------------------------+
// | This library is free software; you can redistribute it and/or |
// | modify it under the terms of the GNU Lesser General Public |
// | License as published by the Free Software Foundation; either |
// | version 2.1 of the License, or (at your option) any later version. |
// | This library is distributed in the hope that it will be useful, |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
// | Lesser General Public License for more details. |
// | You should have received a copy of the GNU Lesser General Public |
// | License along with this library; if not, write to the Free Software |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 |
// | USA, or view it online at http://www.gnu.org/licenses/lgpl.txt. |
// +----------------------------------------------------------------------+
// | Authors: Jim Winstead <jimw@apache.org> (original Maxmind version) |
// | Hans Lellelid <hans@xmpl.org> |
// +----------------------------------------------------------------------+
// $Id: DMA.php,v 1.1 2004/07/01 12:51:13 hlellelid Exp $
* Static class to handle mapping of DMA codes to metro regions.
* Use this class with the dmaCode property of the Net_GeoIpLocation object.
* $region = Net_GeoIPDMA::getMetroRegion($record->dmaCode);
* @author Hans Lellelid <hans@xmpl.org>
* @version $Revision: 1.1 $
* Holds DMA -> Metro mapping.
500 => 'Portland-Auburn, ME',
504 => 'Philadelphia, PA',
527 => 'Indianapolis, IN',
530 => 'Tallahassee, FL',
532 => 'Albany-Schenectady-Troy, NY',
536 => 'Youngstown-Warren, OH',
540 => 'Traverse City-Cadillac, MI',
543 => 'Springfield-Holyoke, MA',
544 => 'Norfolk-Portsmouth, VA',
545 => 'Greenville-New Bern-Washington, NC',
548 => 'West Palm Beach, FL',
552 => 'Presque Isle, ME',
556 => 'Richmond-Petersburg, VA',
559 => 'Bluefield-Beckley-Oak Hill, WV',
560 => 'Raleigh-Durham, NC',
561 => 'Jacksonville, FL',
563 => 'Grand Rapids, MI',
564 => 'Charleston-Huntington, WV',
566 => 'Harrisburg-Lancaster-Lebanon-York, PA',
567 => 'Greenville-Spartenburg, SC',
569 => 'Harrisonburg, VA',
570 => 'Florence-Myrtle Beach, SC',
573 => 'Roanoke-Lynchburg, VA',
574 => 'Johnstown-Altoona, PA',
575 => 'Chattanooga, TN',
577 => 'Wilkes Barre-Scranton, PA',
581 => 'Terre Haute, IN',
584 => 'Charlottesville, VA',
592 => 'Gainesville, FL',
597 => 'Parkersburg, WV',
598 => 'Clarksburg-Weston, WV',
600 => 'Corpus Christi, TX',
603 => 'Joplin-Pittsburg, MO',
604 => 'Columbia-Jefferson City, MO',
611 => 'Rochester-Mason City-Austin, MN',
613 => 'Minneapolis-St Paul, MN',
616 => 'Kansas City, MO',
619 => 'Springfield, MO',
622 => 'New Orleans, LA',
623 => 'Dallas-Fort Worth, TX',
625 => 'Waco-Temple-Bryan, TX',
627 => 'Wichita Falls, TX',
631 => 'Ottumwa-Kirksville, IA',
633 => 'Odessa-Midland, TX',
637 => 'Cedar Rapids-Waterloo, IA',
641 => 'San Antonio, TX',
643 => 'Lake Charles, LA',
647 => 'Greenwood-Greenville, MS',
648 => 'Champaign-Springfield-Decatur, IL',
650 => 'Oklahoma City, OK',
656 => 'Panama City, FL',
658 => 'Green Bay-Appleton, WI',
662 => 'Abilene-Sweetwater, TX',
670 => 'Ft Smith-Fay-Springfield, AR',
673 => 'Columbus-Tupelo-West Point, MS',
675 => 'Peoria-Bloomington, IL',
682 => 'Davenport-Rock Island-Moline, IL',
687 => 'Minot-Bismarck-Dickinson, ND',
692 => 'Beaumont-Port Author, TX',
693 => 'Little Rock-Pine Bluff, AR',
702 => 'La Crosse-Eau Claire, WI',
705 => 'Wausau-Rhinelander, WI',
709 => 'Tyler-Longview, TX',
710 => 'Hattiesburg-Laurel, MS',
716 => 'Baton Rouge, LA',
722 => 'Lincoln-Hastings, NE',
724 => 'Fargo-Valley City, ND',
725 => 'Sioux Falls, SD',
736 => 'Bowling Green, KY',
740 => 'North Platte, NE',
746 => 'Biloxi-Gulfport, MS',
752 => 'Colorado Springs, CO',
754 => 'Butte-Bozeman, MT',
755 => 'Great Falls, MT',
758 => 'Idaho Falls-Pocatello, ID',
767 => 'Casper-Riverton, WY',
770 => 'Salt Lake City, UT',
773 => 'Grand Junction, CO',
790 => 'Albuquerque, NM',
800 => 'Bakersfield, CA',
803 => 'Los Angeles, CA',
804 => 'Palm Springs, CA',
807 => 'San Francisco, CA',
810 => 'Yakima-Pasco, WA',
813 => 'Medford-Klamath Falls, OR',
819 => 'Seattle-Tacoma, WA',
828 => 'Monterey-Salinas, CA',
855 => 'Santa Barbara, CA',
868 => 'Chico-Redding, CA',
* Lookup the metro region based on the provided DMA code.
* @return string Metro region name.
if (self ::$dmaMap === null ) {
return self ::$dmaMap[$dmaCode];
* Reverse lookup of DMA code if [exact] metro region name is known.
* @param string $metro Metro region name.
* @return int DMA code, or false if not found.
if (self ::$dmaMap === null ) {
Documentation generated on Mon, 11 Mar 2019 14:20:12 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|