Download the PHP package happyphper/country without Composer

On this page you can find all versions of the php package happyphper/country. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package country

Country PHP Package

这是一个简单的 PHP 包,提供了所有国家的信息,包括 ISO 代码、名称和国旗。

数据来源

本包使用的国家数据来自 ISO 3166-1 标准,包括:

安装

使用 Composer 安装:

使用方法

获取所有国家

通过 ISO 代码获取国家

获取国家信息

获取国旗 URL

包支持多种方式获取国旗 URL:

1. 获取默认尺寸的国旗(320px 宽度)

2. 获取固定宽度的国旗

3. 获取固定高度的国旗

4. 获取固定尺寸的国旗

5. 获取不同格式的国旗

6. 获取 SVG 格式的国旗

多语言支持

本包支持多语言(国际化),可通过设置 locale 获取不同语言的国家名称。 目前已内置支持:英文(en)、简体中文(zh-CN)、繁体中文(zh-TW)。

示例

如需自定义语言,可在 resources/lang/ 目录下添加对应的语言文件。

国旗来源

国旗图片来自 flagcdn.com,这是一个免费的国旗 CDN 服务。

许可证

MIT License


All versions of country with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package happyphper/country contains the following files

Loading the files please wait ...