menatwork/maxmind

Contao 的 MaxMind GeoIP 定时任务和集成

安装: 28

依赖: 0

建议者: 0

安全: 0

星星: 4

观察者: 7

分支: 0

开放问题: 0

类型:contao-module

1.1.2 2016-08-08 12:42 UTC

This package is auto-updated.

Last update: 2024-09-20 08:27:28 UTC


README

MaxMind 扩展作为通用定时任务,用于传输 GeoIP 数据。通过后端配置,可以自动下载并处理 ZIP 文件。还可以使用可选的许可证密钥处理付费 ZIP 文件。

MaxMind 扩展旨在作为通用定时任务,用于传输 GeoIP 数据。使用后端配置,将自动下载并处理 ZIP 文件。也可以使用可选的许可证密钥处理付费 ZIP 文件。

控制台 / 控制台

cd /var/www/contao/system/modules/maxmind
php MaxMindCaller.php

参数

--verbose  // Print log msg on screen
--dry-run  // Don't import into database, just download it.
--no-mail  // Send no mail notification
--force  // Always import into database. Don't work with dry run.
--language "de"  // Contains the language for the backend.

HTTP 请求 / HTTP 请求

由于 Contao 3.x 保护了 system/modules 中的所有文件夹,因此未经修改的直接请求(例如,更改根目录下的 .htaccess 或在 system/modules 中放置一个 .htaccess)仅在 Contao 2.11 中可行。

由于 Contao 3+ 保护了 system/modules 中的所有子文件夹,因此在不进行修改(例如,更改根目录下的 .htaccess 或在指定的要列入白名单的文件夹中放置一个 .htaccess)的情况下,仅能在 Contao 2.11 中进行直接请求。

http://www.example.com/system/modules/cleanup/MaxMindCaller.php

Contao 定时任务

Contao 提供了将自定义请求集成到系统内置定时任务中的功能。只需从 config.example.php 中的 5 个可能示例中取一个,并将其复制到 dcaconfig.php 或自己的扩展的 config.php 中,然后取消注释即可。在 Contao 2.11 中没有每小时和每分钟的请求。

Contao 提供了将自定义请求集成到系统内置定时任务中的功能。只需从 config.example.php 中的以下 5 个示例中取一个,并将其复制到您的扩展的 dcaconfig.php 或 config.php 中。在 Contao 2.11 中没有每小时和每分钟的请求。

$GLOBALS['TL_CRON']['monthly'][]    = array('MaxMind\MaxMind', 'run');
$GLOBALS['TL_CRON']['weekly'][]     = array('MaxMind\MaxMind', 'run');
$GLOBALS['TL_CRON']['daily'][]      = array('MaxMind\MaxMind', 'run');

// Contao 3 only
$GLOBALS['TL_CRON']['hourly'][]     = array('MaxMind\MaxMind', 'run');
$GLOBALS['TL_CRON']['minutely'][]   = array('MaxMind\MaxMind', 'run');