PHP Accelerators/Cachers will boost the performance of your PHP applications, by caching the compiled form of php scripts to avoid the overhead of parsing and compiling the code every time the page is loaded. A PHP accelerator typically reduces server load and increases the speed of your PHP code by 1-10 times. Normally you will install these in …
Category Archives: PHP
Why APC sucks (and should be pulled from PECL)
APC (Alternative PHP Caching http://us.php.net/manual/en/book.apc.php) is a memory based opcode caching system which supports variable caching inside of php scripts. It’s among 3 major opcode cachers for PHP (the other two are XCache and EAccelerator). While APC sounds great (after all, to install it all you need to type is `pecl install apc`), it suffers from a …
Continue reading “Why APC sucks (and should be pulled from PECL)”
PHP heredoc syntax
In order to allow people to easily write large amounts of text from within PHP, but without the need to constantly escape things, heredoc syntax was developed. Heredoc might be a little tricky to understand at first, but it’s actually a big help. Put simply, it allows you to define your own string limiter so …
Retrieve Your Gmail Emails Using PHP and IMAP
Grabbing emails from your Gmail account using PHP is probably easier than you think. Armed with PHP and its IMAP extension, you can retrieve emails from your Gmail account in no time! Just for fun, I’ll be using the MooTools Fx.Accordion plugin to display each email.
Multiple AddThis in Loop
Continuing on with my previous post, this post shows how to have multiple AddThis instances on the same page. This is especially useful if you have a WordPress loop (such as an article index, or just your normal blog loop on your main page).
Selecting random record from MySQL database table.
The simplest way of selecting random rows from the MySQL database is to use "ORDER BY RAND()" clause in the query.