noroman/postindex

俄罗斯邮政编码

v0.2.2 2022-06-22 19:05 UTC

This package is auto-updated.

Last update: 2024-09-22 23:55:06 UTC


README

此处获取/更新包含所有邮政编码的 dbf 文件,并将其转换为 csv 格式以供进一步使用。

<?php

use GuzzleHttp\Exception\GuzzleException;
use PostIndex\PostIndex;
use PostIndex\PostIndexException;

require_once __DIR__ . '/vendor/autoload.php';

try {
    $pi = new PostIndex(__DIR__, new \DateTime('2018-01-01 00:00:00'));
    $pathCSV = $pi->refresh()->filepathCSV();
    print_r($pathCSV);
} catch (PostIndexException $e) {
    die($e->getMessage());
} catch (GuzzleException $e) {
    die($e->getMessage());
}