Untitled
unknown
plain_text
a year ago
556 B
9
Indexable
<?php
$timeoutFile = 'timeout.txt';
if(!file_exists($timeoutFile)) {
file_put_contents($timeoutFile, time());
}
$startTime = file_get_contents($timeoutFile);
$currentTime = time();
$elapsedTime = $currentTime - $startTime;
if($elapsedTime < 900) {
$ch = curl_init($_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_exec($ch);
curl_close($ch);
} else {
if($elapsedTime > 900 && $elapsedTime < 910) {
file_put_contents($timeoutFile, time());
}
}
?>Editor is loading...
Leave a Comment