Flash Games
I have made a plugin for wordpress to display up to 200 flash games within your wordpress blog.
It is a relatively simple plugin that pulls data from my arcade website Lingolux flash games.
At the backend Lingolux uses a simple wordpress WP_Query loop to pull data from the site as specified by the plugin.
This allows the user to select the number of games and whether to display new games, top games, or both.
Although most blogs will cache the page themselves i did not want my plugin to overwhelm my website so i implemented a simple caching system in php.
I found the information here
$cachefile = "cache/".$reqfilename.".html";
$cachetime = 5 * 60; // 5 minutes
// Serve from the cache if it is younger than $cachetime
if (file_exists($cachefile) && (time() - $cachetime
< filemtime($cachefile)))
{
include($cachefile);
echo "";
exit;
}
ob_start(); // start the output buffer
?>
I placed the wp query here
// open the cache file for writing
$fp = fopen($cachefile, 'w');
// save the contents of output buffer to the file
fwrite($fp, ob_get_contents());
// close the file
fclose($fp);
// Send the output to the browser
ob_end_flush();
?>
This provided some simple caching of the backend.
The plugin also uses a simple lightbox to display the flash.
You can see the plugin in operation here and you can download it from the wordpress site here
Flash Games Page
Additional comments powered by BackType
Archives
Recent Comments
- SEO on Server load problems. Varnish vs Nginx vs Apache vs PHP DSO vs FCGI vs suPHP vs APC vs eAccelerator vs memcached
- admin on Server load problems. Varnish vs Nginx vs Apache vs PHP DSO vs FCGI vs suPHP vs APC vs eAccelerator vs memcached
- Paul on Server load problems. Varnish vs Nginx vs Apache vs PHP DSO vs FCGI vs suPHP vs APC vs eAccelerator vs memcached
- GingerSwans on how to get round irelands piratebay block
- GingerSwans on Mr Crabbys Beach Ball Adventure Launched




