Category: PHP

PHP optimization, techniques and practises.

WordPress Optimization

WordPress is currently one of the most popular blogging/CMS applications. Here are some ideas for optimizing WordPress and reducing the CPU consumption of this PHP script. Make a backup of your account first, and then upgrade to the latest version…

Encrypt and Decrypt for URL Using PHP

Here is the function for Encrypt and Decrypt (String, text, ids) for URL Using PHP. please set change $secret_key and $secret_iv for your wish to generate secure encryption and decryption keys. function encryptor($action, $string) { $output = false; $encrypt_method =…

Manage and Tweak Dedicated Linux Hosting Web Server

To manage your linux based Dedicated Linux Web server having plesk as control panel.  You can do following to tweak, enhance performance and to manage services: Linux Configuration As we do on our normal Linux based server, we list out…

Using PHP script to delete a multiple files

This is short php script to delete files file by file in a loop. To do deletion with PHP, use this little PHP script: $dir = “/directory/”; $dh = opendir($dir); $i = 0; while (($file = readdir($dh)) !== false) {…

TIPS

Check HTTP Connections The following may indicate if you’re getting slammed by one host. It should display all current connections to port 80 ordered by count netstat -anp |awk ‘/:80/ {print $5}’ | cut -d: -f1 | sort | uniq…