query->count ) { $cachefile = fopen($cache, 'wb'); fwrite($cachefile, $feed); fclose($cachefile); } } else { // We already have local cache. Use that instead. $feed = file_get_contents($cache); } // Decode that shizzle $feed = json_decode($feed); // Activetuts is still using the old Flashtuts RSS path. if ( $siteName === 'flashtuts' ) $siteName = 'activetuts'; else if ( $siteName === 'webdesigntutsplus' ) $siteName = 'webdesigntuts'; // Include the view include('views/site.tmpl.php');