Tips and Tutorials

Dynamic JavaScript with PHP

Early this morning, I released Top 10 – A Page Counter and Popular Posts plugin for WordPress. I detailed my experience while designing this plugin. The major problem that I faced while working with this plugin was with WP Super Cache. WP Super Cache creates a static file of your post and displays this to the viewer. As a result, any PHP code that is present in your WordPress blog template is executed only once and the cached file is then served to your visitor.

The initial version of Top 10 used PHP to record the page views as well as display them and so using WP Super Cache ensured that both of these would never increment.

This is where JavaScript with PHP comes in. I ended up using AJAX to record the page views. However, for displaying the count I chose to do so by serving the PHP file as a JavaScript file.

Here’s how you go about it.

Read More »Dynamic JavaScript with PHP


Learning at the all new

For Dummies is one of the top selling series of books covering tonnes of topics under the sun. It’s usually one of the first purchases for people who want to start afresh anything from business, to computers and the Internet, electronics, finance etc. Now, For Dummies has relaunched Dummies.

Find/Delete/Backup Unwanted Files

It’s normal for anyone to run a scan every now and then just to check if there is any unwanted stuff left in your hard drive. If it bothers you that what could have taken up your hard disk space especially when you don’t even have time to see and realize that your storage space is low then you can give Simple Director Analyzer v1.0 a try.