Goosle/goosle-cron.php
Arnan de Gans f7971ae5ca Version 1.2.2
- [new] Individual on/off setting for each search engine and torrent site
- [new] YTS Highlights for latest releases, highest rated or most downloaded movies
- [new] EZTV Highlights for latest TV Show episode releases
- [new] Goosle-cron.php file for if you want to clear the file cache in the background
- [change] l33tx torrents disabled by default - They use Cloudflare now, preventing the crawler from working reliably
- [change] Ecosia search disabled by default - They use some kind of bot detector now, preventing the crawler from working once caught
- [change] Now uses an ABSPATH global for file inclusions and paths
- [change] More discrete TV Show and Movie result detection in text search
- [tweak] Filter for eztv search, only include eztv if the search term starts with 'tt' (case insensitive)
- [tweak] Better ecosia link formatting to (hopefully) not get blocked by their bot detector
- [tweak] cURL headers to be (even) more browser-like
- [fix] Variable $url sometimes empty for certain torrent results
- [fix] Blocked category filter for YTS results now actually works
2024-02-16 14:56:04 -06:00

44 lines
No EOL
1.6 KiB
PHP

<?php
if(!defined('ABSPATH')) define('ABSPATH', dirname(__FILE__) . '/');
require ABSPATH."functions/tools.php";
$opts = load_opts();
$auth = (isset($_GET['a'])) ? sanitize($_GET['a']) : $opts->user_auth;
/* ------------------------------------------------------------------------------------
* Goosle - A meta search engine for private and fast internet fun.
*
* COPYRIGHT NOTICE
* Copyright 2023-2024 Arnan de Gans. All Rights Reserved.
*
* COPYRIGHT NOTICES AND ALL THE COMMENTS SHOULD REMAIN INTACT.
* By using this code you agree to indemnify Arnan de Gans from any
* liability that might arise from its use.
---------------------------------------------------------------------------------------
* Includes:
* - Clearing out old cached results when using the file cache.
---------------------------------------------------------------------------------------
* Execute this file with a cron once or twice a day.
* If you've enabled the access hash, don't forget to include ?a=YOUR_HASH to the url.
*
* Example for 5 minutes past every midnight and noon:
* 5 0,12 * * * wget -qO - https://example.com/goosle-cron.php?a=YOUR_HASH
*
* Example for every midnight:
* 0 0 * * * wget -qO - https://example.com/goosle-cron.php?a=YOUR_HASH
------------------------------------------------------------------------------------ */
if(verify_hash($opts, $auth)) {
// Clear out old cached files?
if($opts->cache == "on" && $opts->cache_type == "file") {
$ttl = intval($opts->cache_time) * 60;
delete_cached_results($ttl);
}
echo "Done!";
} else {
echo "Unauthorized!";
}
exit;
?>