Skip to content

Instantly share code, notes, and snippets.

@zllovesuki
Last active August 29, 2015 14:02
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save zllovesuki/3f5d001868904eb5cb4c to your computer and use it in GitHub Desktop.
Save zllovesuki/3f5d001868904eb5cb4c to your computer and use it in GitHub Desktop.
Cache Request
<?php
$website = 'http://yourwebsite.com'; //no trailing slash
$key = 'kokenwtf';
/*
*
* RUNNING ON A MACHINE THAT HAS UNLIMITED EXECUTION TIME IS HIGHLY ENCOURAGED
*
* If you have firewall installed on your webserver, whitelist your own IP or disable it
* In case your firewall blacklists you.
*
*/
$urls = file_get_contents($website.'/cache.url.php?key='.$key);
$requests = json_decode($urls, true);
if ($requests === NULL) die;
foreach($requests as $i) {
$ch = curl_init($website.$i);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, false);
curl_setopt($ch, CURLOPT_HEADER, false);
curl_exec($ch);
curl_close($ch);
}
@drazin
Copy link

drazin commented Jun 5, 2015

what is the key referenced here? i generated an api token but that doesnt seem to be it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment