Download the PHP package webtigers/tld-rules without Composer

On this page you can find all versions of the php package webtigers/tld-rules. 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 tld-rules

TldRules

A zero-dependency catalog of per-TLD domain-registration rules, with a small query API.

Registries impose rules a reseller must satisfy to register a domain — residency/eligibility, extra registrant fields ("extended attributes"), whether WHOIS privacy is offered, and the allowed registration period. No registrar API lets you interrogate these, so they end up hardcoded per project, over and over. This library collects them as plain, language-neutral JSON and wraps them in a tiny PHP class.

The extended-attribute field keys follow OpenSRS's tld_data naming (e.g. nexus.category for .us, registrant_extra_info.legal_type for .ca) — the most widely documented scheme — but the data is useful whatever registrar you use.

Install

Use

Longest registrable suffix wins: example.com.au resolves the com.au rules, example.co.uk resolves the .uk ruleset. Unknown TLDs return the catalog defaults (privacy available, 1–10 year period, no extra fields).

Loading your own data

Data shape

type is one of select | text | country | date. required_if makes a field required when another field holds one of the listed values.

Coverage

TLDs with explicit rules include .us, .ca, .uk, .eu, .au (+ com/net/org/asn/id.au), .it, .de, .es, .fr (+ French overseas), .nl, .no, .se, .nu, .ru, .hk, .my, .sg, .in family, .mx, .com.br, .com.ar, .cl, .co.za, .ie, .pro, .travel, .aero, .coop, .jobs, .law, .abogado, .xxx, and more. Anything not listed inherits the permissive defaults.

Privacy-availability flags are encoded from registry policy (no API returns them); corrections welcome.

Contributing

The catalog is data — add or fix a TLD in data/tld-rules.json and send a PR. Run composer test.

License

BSD-3-Clause © WebTigers. Part of making the web more free and open.


All versions of tld-rules with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
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 webtigers/tld-rules contains the following files

Loading the files please wait ...