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 | |
// See https://lazycat.org/php-curl.html for license & known issues | |
function httpGet($url, $ttl = 86400) | |
{ | |
/* Change this or make it an option as appropriate. If you're | |
* getting urls that shouldn't be visible to the public, put the | |
* cache folder somewhere it can't be accessed from the web | |
*/ | |
$cache_path = dirname(__FILE__).'/cache'; |
NewerOlder