Skip to content

Instantly share code, notes, and snippets.

@fvoges
Forked from zllovesuki/request.php
Last active August 29, 2015 14:17
Show Gist options
  • Save fvoges/2d70c91f360892bda781 to your computer and use it in GitHub Desktop.
Save fvoges/2d70c91f360892bda781 to your computer and use it in GitHub Desktop.
<?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