Closed un99known99 closed 2 years ago
There's an example of use as a comment at the beginning of run.php
* Example :
* <?php
* $key = 'your-license-key';
* include_once __DIR__ . '/run.php';
* $results = ozh_yourls_geoip2_update_client_run($key);
* // do something with $results
* ?>
Put this in cron.php
and call this file with your cron script
uh, that was a fast one, thank u very much :)
hm what am I doing wrong?
for testing purposes:
pi@raspberrypi:[~/TEST/YOURLS_UPGRADE] $ /usr/bin/php ./run.php PHP Fatal error: Uncaught Error: Call to undefined function ozh_yourls_geoip2_update_client_run() in /home/pi/TEST/YOURLS_UPGRADE/run.php:4 Stack trace:
thrown in /home/pi/TEST/YOURLS_UPGRADE/run.php on line 4
Do I mixed something with path?
should it run like a shell-script or with/usr/bin/php
/home/bob/site.com/users/plugin/yourls-geoip-update/cron.php
:
<?php
$key = 'your-license-key';
include_once __DIR__ . '/run.php';
$results = ozh_yourls_geoip2_update_client_run($key);
var_dump($results);
Crontab :
0 0 1 * * /usr/bin/php /home/bob/site.com/users/plugin/yourls-geoip-update/cron.php
Path to be edited to suit your install obviously.
many thanks @ozh !!!
Hi, thx a ton for the version 1.9.0 - upgrade worked out perfect for me, just one point open, I would like to useh the run.php for geopip updates.
Do I only need to insert the maxmind key and just use "/usr/bin/php run.php" in a cron script?
I am not sure how to handle the automatic update?
Thanks in advance for ur help.
Best regards, Mike