承接 jonasraoni/tld-to-iso 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

jonasraoni/tld-to-iso

Composer 安装命令:

composer require jonasraoni/tld-to-iso

包简介

Maps top level domains (TLD) against countries using the ISO 3166-1 alpha-2 format and vice-versa.

README 文档

README

Mappings from top level domains (TLDs) to ISO 3166-1 alpha-2 and vice-versa.

Usage

Install the package:

composer require jonasraoni/tld-to-iso

The package provides 2 separated mappings (just to decrease the amount of processing/bloat data loaded into memory):

Choose the one that fits your needs and call the static method get, it might return the right mapping or null if it's invalid.

use JonasRaoni\TldToIso\TldToIso;

echo 'UK = ' . TldToIso::get('UK');

Data Generation

To regenerate the classes, ensure the submodules are updated, then call the build.php script (just a simple code generator) and it will overwrite the existing classes.

Data Source

  • The list of countries/TLDs was retrieved from this link: https://datahub.io/core/country-codes (the .csv is linked to this repository as a submodule). The list isn't complete, as it's missing IDN entries (e.g. .рф) and custom domains (e.g. .barcelona), but let it be... The Wikipedia's entry looks more complete, but I'll be unable to keep it synchronized.

统计信息

  • 总下载量: 17
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 3
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-03-27

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固