Download the PHP package ipfy/homoglyph without Composer

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

Homoglyph

Unicode-aware detection of visually confusable domain names.

Homoglyph is a multi-language, standards-based library for spotting Unicode homoglyph / homograph structure in domain names, using Unicode UTS #39 17.0.0.

Those strings are not the same domain. The second mixes Cyrillic letters that UTS #39 maps as confusable with Latin.

It is for developers who accept domains through email fields, URL fields, registration forms, and similar inputs.

Implementations

One GitHub repository, ipfy/Homoglyph, ships native packages:

Language Package Install
JavaScript npm @ipfy/homoglyph npm install @ipfy/homoglyph
Python PyPI ipfy-homoglyph pip install ipfy-homoglyph
PHP Packagist ipfy/homoglyph composer require ipfy/homoglyph

All three implement the same Homoglyph specification (see docs/DESIGN.md and docs/ARCHITECTURE.md), the same Unicode 17.0.0 confusable data, and the shared corpus in conformance/cases/.

JavaScript additionally provides browser warn() / reject() helpers. Python and PHP provide the core detect() API only.

What it is — and is not

The security boundary is the domain. Email local-parts and URL paths, queries, and fragments are not treated as hostname evidence.

Observation Meaning
Unicode in a domain Not malicious. IDNs are legitimate.
Non-Latin Not malicious.
Punycode / xn-- Not malicious. Valid A-labels are decoded, then analyzed.
Mixed script Not automatically malicious.
detected: true A UTS #39-relevant issue worth reporting
rejectable: true High-confidence finding suitable for hard enforcement

Homoglyph does not decide whether a domain is a phishing site. It is not a blacklist, reputation service, DNS client, or TLD policy engine.

JavaScript (npm)

CDN (IIFE, globalThis.Homoglyph):

Browser-only helpers: Homoglyph.warn(input) and Homoglyph.reject(input). See below. There is no init().

Python (PyPI)

PHP (Packagist)

Requires PHP 8.1+ and ext-intl (Unicode NFC/NFD via Normalizer).

Email and URL behavior

Punycode / IDNA

Valid xn-- A-labels are decoded and then analyzed. Punycode itself is not evidence of malice. Successful Punycode decoding is not full IDNA validation.

Unicode

Item Value
Unicode / UTS #39 17.0.0
Source of truth unicode/ in this repository
Runtime download none

Refresh generated maps with npm run generate (writes JavaScript, Python, and PHP runtime data from the same files).

JavaScript warn() / reject()

These exist only in the JavaScript browser build. They attach form metadata or constraint validation from detect(). Visitor-facing reject() messages are ordinary validation text, not “phishing” warnings.

Development

License

MIT. Unicode data: Unicode License V3 (see NOTICE).


All versions of homoglyph with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
ext-intl Version *
ext-json Version *
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 ipfy/homoglyph contains the following files

Loading the files please wait ...