Download the PHP package katmore/intl-rand-string without Composer

On this page you can find all versions of the php package katmore/intl-rand-string. 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 intl-rand-string

IntlRandString

generate internationalized random alpha-numeric strings

About

The IntlRandString package facilitates generating random strings in multiple internationalized character sets. A typical use-case is generating random passwords in a targeted "language", i.e. using characters familiar to a language rather than simply using only english latin characters, as is typical. For similar reasons, it could also prove ideal in other use-cases, such as: password reset validation codes, coupon or promotional codes, etc.

Usage in a PHP Project

use composer to add IntlRandString to your PHP project:

A random string can be generated with the following character sets:

Cyrillic Charset

Example, using the Cyrillic Charset to generate a random string:

The above example should output a random string that includes only cyrillic characters and latin digits, such as follows:

English Charset

Example, using the English Charset to generate a random string:

The above example should output a random string that includes only latin characters and latin digits as used in English, such as follows:

German Charset

Example, using the German Charset to generate a random string:

The above example should output a random string that includes only latin characters and latin digits as used in German, such as follows:

Italian Charset

Example, using the Italian Charset to generate a random string:

The above example should output a random string that includes only latin characters and latin digits as used in Italian, such as follows:

Spanish Charset

Example, using the Spanish Charset to generate a random string:

The above example should output a random string that includes only latin characters and latin digits as used in Spanish, such as follows:

Development

The following utility scripts facilitate development of character sets:

unit tests

The unit tests specified by phpunit.xml check the basic sanity and entropy of generated random strings for each character set.

make-charset.php dev utility

The bin/devel/make-charset.php command-line developer utility script creates a character set class defintion PHP source file in the src/IntlRandString/Charset directory. After creating a character set, perform all unit tests to ensure conformity.

Specifying the --help option will display usage details.

make-all-charsets.sh dev utility

The bin/devel/make-all-charsets.sh command-line developer utility script contains the Unicode start and end points for all character set defintion source files.

The Unicode character ranges for the Charsets are ultimately defined in perform all unit tests to ensure conformity.

For example, the make-all-charsets.sh as follows:

rand-string utility

A standalone utility is provided by the bin/rand-string.php script. Details regarding the usage of this utility and instructions for an optional global installation are included in this section.

rand-string standalone installation

These installation instructions rely on the make-phar.sh installer script. See the make-phar.sh utility section for more in-depth details and troubleshooting.

Installation instructions:

rand-string utility examples

The rand-string (or bin/rand-string.php) command line utility generates random strings.

Example #1, using default charset and length.

The first positional argument specifies the length of the random string.

Example #2, using default charset and specifying length:

A charset may be specified for one-time use with the --charset=<CHARSET-NAME> flag.

Example #3, using cyrillic charset:

The English charset is the global default, though this may be changed (see usage).

Example #3, setting the german as default:

Any Charset available in IntlRandString\Charset may be used.

Example #4, getting a list of available charsets:

rand-string utility usage

make-phar.sh utility

The bin/install/make-phar.sh utility creates a standalone rand-string.phar phar package file using bin/rand-string.php as the entrypoint. Optionally, it will copy the phar package file to an installation path.

Prerequisites

Usage

Legal

Copyright

IntlRandString - https://github.com/katmore/intl-rand-string

Copyright (c) 2012-2018 Doug Bird. All Rights Reserved.

License

IntlRandString is copyrighted free software. You may redistribute and modify it under either the terms and conditions of the "The MIT License (MIT)"; or the terms and conditions of the "GPL v3 License". See LICENSE and GPLv3.


All versions of intl-rand-string with dependencies

PHP Build Version
Package Version
Requires php Version >=7.2.0
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 katmore/intl-rand-string contains the following files

Loading the files please wait ....