Could you use MySQL to pull zipcodes instead? Not sure how to do this something like this:
PHP Code:
$zipcode_prefix = substr($order->delivery['postcode'],0,3);
global $db;
$check = $db->Execute("select zipcodezone from " . TABLE_ZIPCODEZONE . " where '" . $zipcode_prefix . "' BETWEEN zipcode_start and zipcode_end");
while (!$check->EOF) {
$dest_zone = $check->fields['zipcodezone'];
$check->MoveNext();
}
// echo $dest_zone;
than in MySQL do this:
CREATE TABLE `zipcodezone` (
`zipcode_id` INT( 11 ) NOT NULL AUTO_INCREMENT PRIMARY KEY,
`zipcode_start` char(3) NOT NULL default '0',
`zipcode_end` char(3) NOT NULL default '0',
`zipcodezone` int(1) NOT NULL default '0');
INSERT INTO `zipcodezone`
(`zipcode_id` ,`zipcode_start` ,`zipcode_end` ,`zipcodezone`)
VALUES (1, '004', '005', 8),
(2, '010', '089', 8), etc
Not sure how to implement this though. Thanks