crunchbutton/cli/timeout.php
2013-05-28 17:39:48 -03:00

26 lines
454 B
PHP
Executable File

#!/usr/local/bin/php
<?php
error_reporting(E_ERROR | E_PARSE);
ini_set('display_errors',true);
$a = (object)getopt('s::c::r::f::e::');
if ($a->s) {
sleep($a->s / 1000); // ms
}
// include our libraries AFTER the nap, so we dont keep mysql or our memory awake
require_once('../include/crunchbutton.php');
if ($a->r) {
eval($a->r);
}
if ($a->c) {
$c = unserialize(base64_decode($a->c));
$c->__invoke();
}
if ($a->f) {
require_once('./'.$a->f);
}