Last active
August 29, 2015 14:02
-
-
Save zllovesuki/3f5d001868904eb5cb4c to your computer and use it in GitHub Desktop.
Cache Request
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
what is the key referenced here? i generated an api token but that doesnt seem to be it?