Category Archives: PHP

Useful code snippets in PHP.

Top 10 WordPress Plugins

1. Akismet by Automattic is probably the best WP plugin out there. Akismet is a comment and trackback spam filter for your WP powered blog. It is a true mathematical equation that your blogs page rank is exponentially proportional to the number of viagra and penis enlargement spam comments you will receive. Akismet blocks them [...]

Also posted in CMS, TechKnow | 16 Comments

AJAX Header Rotator

The Joomla! installation comes with a neat module called Random Image. The Random Image module accepts an image directory path, and image type and will randomly and dynamically displays one of the images found in the image directory path for every visit. But if you want to dynamically display images on you Joomla! site, I [...]

Also posted in CMS, TechKnow | 10 Comments

Page Redirect

I totally forgot how to redirect to another page using PHP. After trying to remember I had to look it up in the PHP documentation. So if you want to redirect to another page using PHP you write to the header using this bit of code: header(‘Location: index.html’); I opted to use PHP solution instead [...]

Also posted in HTML/XML, JavaScript, TechKnow | Leave a comment

Import Script, Import CSS, Import PHP

Just because sometimes I forget, here are some code fragments to import JavaScript, CSS, and PHP files. JavaScript: <script type=’text/javascript’ src=’directory/file.js’> </script> CSS: <style type=’text/css’ media=’all’> @import ‘directory/file.css’; </style> Icon: <link rel=’Shortcut Icon’ href=’directory/file.ico’ type=’image/x-icon’> PHP: <?php @ require_once (‘directory/file.html’); ?> For the PHP import, by placing the @ symbol before require_once suppresses any error [...]

Also posted in CSS, HTML/XML, JavaScript, TechKnow | Leave a comment