Skip to content

Instantly share code, notes, and snippets.

View fedmich's full-sized avatar
🏠
Working from home. open for job opportunity

Federico fedmich

🏠
Working from home. open for job opportunity
View GitHub Profile
<?php
/*
* @author Fedmich
* @version v1.1
* File caching version
*/
function GetHTML($url, $secs = 900) {
$md5 = md5($url);
$file = dirname(__FILE__) . "/cache/page_$md5.tmp";
@fedmich
fedmich / Expire headers.htaccess
Created March 19, 2012 06:28
HTaccess apache
<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault "access plus 1 seconds"
ExpiresByType image/x-icon "access plus 2692000 seconds"
ExpiresByType image/jpeg "access plus 2692000 seconds"
ExpiresByType image/png "access plus 2692000 seconds"
ExpiresByType image/gif "access plus 2692000 seconds"
ExpiresByType application/x-shockwave-flash "access plus 2692000 seconds"
ExpiresByType text/css "access plus 2692000 seconds"
ExpiresByType text/javascript "access plus 2692000 seconds"