Skip to content

Instantly share code, notes, and snippets.

View cizario's full-sized avatar
🏠
working from my cave

cizario

🏠
working from my cave
View GitHub Profile
<?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';