Download the PHP package b13/magnets without Composer

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

TYPO3 Extension "magnets"

This extension acts as a thin wrapper for TYPO3 to access GeoIP relevant information.

A symfony CLI Command can be added to download the latest GeoIP2 data.

For download the latest GeoIP2 data you have to provide an licence-key from maxmind (as .env-Variable or $GLOBALS['TYPO3_CONF_VARS']['SYS']['GeoIPLicenceKey'])

Maxmind API requests are limited (1000 requests/day). As an alternative the databases (GeoLite2-City, GeoLite2-Country) can be stored as a "Generic Package" in GitLab.

For Download during the CI run the CI_JOB_TOKEN can be used as follows:

Installation

Run composer req b13/magnets and install the extension via Extension Manager.

Usage

Ensure your cronjob / scheduler task is running and use the IpLocation PHP class to have a nice and quick API.

In addition, you have "countryCode" as TypoScript condition available.

[countryCode == 'FR']
  page.10 = TEXT
  page.10.value = You are from france
[global]

The condition is also available in site configurations.

Settings

Headers to send while running the request to download the database. Either use JOB-TOKEN or PRIVATE-TOKEN to authenticate on GitLab.

Change the URL to retrieve the databases from. The URL needs to include ###REMOTE_EDITION### which will be replaced by the "remote edition" (GeoLite2-Country and GeoLite2-City).

Store and Update databases using GitLab

Create a project and add a .gitlab-ci.yml

Under Settings -> CI/CD -> Variables add a variable named "GEOIP_LICENCE_KEY" containing the licence-key.

For regular updates add a "New schedule" und Build -> Pipeline schedules. e.g. 8 00 * * 1,3

License

Just as TYPO3 Core, this is an extension for TYPO3 and also licensed under GPL2+.


Made by b13 with ♥

Find more TYPO3 extensions we have developed that help us deliver value in client projects. As part of the way we work, we focus on testing and best practices to ensure long-term performance, reliability, and results in all our code.


All versions of magnets with dependencies

PHP Build Version
Package Version
Requires typo3/cms-core Version ^12.4 || ^13.4
geoip2/geoip2 Version ^3
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 b13/magnets contains the following files

Loading the files please wait ....