A CSV File and SQL Dump for all the zip codes in Philippines
Posted on: Mar 14, 2010 by wenbert
I spent a few hours yesterday gathering all the zip codes for the Philippines. This is public data, so I am sharing it with everyone. If you use it, I’d appreciate it if you credit me (It is not required but it would be great if you can send some traffic to my site — I have been planning to get a Linode but I can’t afford one yet :P).
Here is a preview of the CSV file:
"id","country","major_area","zip_code","city" "1","PH","Abra","2800","Bangued" "2","PH","Abra","2801","Dolores" "3","PH","Abra","2802","Lagangilang" "4","PH","Abra","2803","Tayum" "5","PH","Abra","2804","PeƱarrubia" "6","PH","Abra","2805","Bucay" "7","PH","Abra","2806","Pidigan" "8","PH","Abra","2807","Langiden" "9","PH","Abra","2808","San Quintin" "10","PH","Abra","2809","San Isidro" "11","PH","Abra","2810","Manabo" "12","PH","Abra","2811","Villaviciosa" "13","PH","Abra","2812","Pilar" "14","PH","Abra","2813","Luba" ... ... ... "462","PH","Cebu","6000","Cebu City" "463","PH","Cebu","6003","Compostela" "464","PH","Cebu","6001","Consolacion" "465","PH","Cebu","6017","Cordova" "466","PH","Cebu","6013","Daanbantayan" "467","PH","Cebu","6022","Dalaguete" "468","PH","Cebu","6004","Danao City" "469","PH","Cebu","6035","Dumanjug" "470","PH","Cebu","6028","Ginatilan" "471","PH","Cebu","6015","Lapu-Lapu City (Opon)" "472","PH","Cebu","6002","Liloan" "473","PH","Cebu","6016","Mactan Airport"
The MySQL Table is like this:
CREATE TABLE IF NOT EXISTS `zipcodes` ( `id` int(11) NOT NULL AUTO_INCREMENT, `country` char(2) NOT NULL, `major_area` varchar(300) NOT NULL, `zip_code` varchar(25) NOT NULL, `city` varchar(300) NOT NULL, PRIMARY KEY (`id`), KEY `major_area` (`major_area`), KEY `zip_code` (`zip_code`), KEY `city` (`city`) ) ENGINE=MyISAM
Updated: March 13, 2010 (2,270 zip codes)
Download the files below:
Corrections, suggestions, etc. just leave a comment below.
Enjoy!
Browse Timeline
- « CSS: Creating a horizontal menu/navigation bar
- » WordPress: How to create a breadcrumb without using any plugins


