HEX
Server: Apache
System: Linux msm5694.mjhst.com 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User: camjab_ssh (1000)
PHP: 5.3.29
Disabled: NONE
Upload Files
File: /home/httpd/html/chatfree24.com/public_html/admin/crons/cronFetchPerformers.php
<?php
/*
Usage:
/path/to/php cronFetchPerformers.php
/path/to/php cronFetchPerformers.php --site=4 (id number from URL in edit site in admin)
*/

ini_set('max_execution_time', 3600); //3600 seconds = 1 hour
ini_set('memory_limit','2048M');
include('../db.php');
include("../functions.camApis.php"); 

$options = getopt('',array("site::"));

if(is_array($options) && isset($options['site'])) { 
	$filterAnd .= " AND paysites.record_num = '".(int)$options['site']."'";
}

$result = dbQuery("SELECT * FROM paysites WHERE enabled = 1 $filterAnd",false);
foreach($result as $row) { 
	echo "Running ".$row['name']."...";
	call_user_func($row['functionName'],$row['record_num'],$row['apiData'],$row['maxResults'],$row['parameters']); 
	echo "Done\n";
}
dbQuery("UPDATE status SET cron_last_run = NOW()");
exit("Finished!\n");