PHP code example of b13 / magnets
1. Go to this page and download the library: Download b13/magnets library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
b13 / magnets example snippets
if (!empty(getenv('CI_JOB_TOKEN'))) {
$GLOBALS['TYPO3_CONF_VARS']['SYS']['GeoIPSource']['url'] = 'https://<GITLAB_HOST>/api/v4/projects/<PROJECT_ID>/packages/generic/GeoLite2/1.0.0/###REMOTE_EDITION###.tar.gz';
$GLOBALS['TYPO3_CONF_VARS']['SYS']['GeoIPSource']['headers'] = [
'JOB-TOKEN' => getenv('CI_JOB_TOKEN'),
];
}
$GLOBALS['TYPO3_CONF_VARS']['SYS']['GeoIPSource']['headers'] = [];
$GLOBALS['TYPO3_CONF_VARS']['SYS']['GeoIPSource']['url'] = 'https://download.maxmind.com/app/geoip_download?suffix=tar.gz&edition_id=###REMOTE_EDITION###';