How to unzip multiple archives quickly?

If you have a lots of zips in your directory, you may be tired of unzipping them one by one. You should not do it manually. You can do it by a single command:

First time I have tried using:

unzip *.zip

However, it did not work. It gifted me error.

You can do it by any of the following methods:

Method One:

unzip ‘*.zip’

Method Two

for i in *.zip; do unzip $i; done

Flash Media Server (FMS) and issue

Today I was working with Flash Media Server (FMS). Everything went accordingly except This file is needed for FMS which is included with FMS archive. We just need to link it correctly.You may check the shared library dependencies by the following command:

# ldd fmscore

In my case, everything was found except It was showing not found. I have started googling. Got a lots of tips. However, none worked. Some sites suggested to create a soft link to this file in /lib (ln -s /opt/adobe/fms/ /lib/ . Some suggested to do same in /usr/lib ((ln -s /opt/adobe/fms/ /usr/lib/ Another site suggested to add fms path in a config file (/etc/ I tried everything without any luck. Continue reading →

cPanel: Enable/disable specific webmail application per user

Today, I faced a situation where I need to show single webmail application to cPanel control panel user. Usually there are three (3) webmail clients. These are horde, squirrel mail, roundcube. However, I was advised to make sure that a specific customer does not see more than one specified. I suggested, ‘Enable Autoload’ feature which did work indeed but did not satisfy him. Then I opened a thread in cPanel forum and I got the following solution. That’s is easy. I quote the whole post here.

You can enable and disable webmail applications as per user accounts. Continue reading →

Best contacts importing script written in PHP

All you know letting visitors/users invite their contacts is one of the cheapest but proven way of marketing. We can get it by placing a contact importer script in our site and requesting users to invite his/her friends by providing email address and password. The script will then contact the server and download contacts from the address book and finally will send a custom or preformatted email to bring them to our site.

But problem is the cost of such importer script. More than one year ago I have purchased such a script most probably at US$30. It can import from popular email services like Yahoo, Gmail, MSN etc. Later I have found some other scripts that can download contacts from a few more sites.

But throwing all them behind, lately I found the most fabulous, most fantastic, most robust and cheapest contact importing script titled “OpenInvite”. If may not believe the previous sentence until you visit their website. It can import contacts from nearly all major email services and social networking sites. I have counted about 48.  Continue reading →

Putting site temporarily down and redirecting users to a maintenance page.

Today I needed this trick. I was having some problem with one of my sites. I want to turn the site down while I am fixing it. But as the site is made with scatter html, php pages, it is not easy to centrally control maintenance mode. But I believed, this is possible by .htaccess trick. After searching a lot I have found a wonderful tutorial for it.

Here is the link of the tip/tutorial.

The tutorial is very easy to understand. If you understand .htaccess then here is the main part.

order deny,allow
deny from all
allow from 123.456.789
ErrorDocument 403 /custom-message.html
<Files custom-message.html>
order allow,deny
allow from all

It first deny all IPs’ access to the site (3rd line) then only allow the webmaster (4th line, you must put your own IP). At 6th line, we mention custom Forbidden (403) page. But it is worthless as we already denied all users (IPs) to all pages. So in next lines we exclusively allow all to our custom 403 page so that they can see only that page.

Hope it will help you like me :).

cPanel 11.24 VPS Optimized(?)

Yesterday I have got the mail from cPanel about some changes in cPanel. Though the changes were applied in CURRENT & EDGE tree, yesterday they entered into RELEASE tree. As I use RELEASE tree I have immediately updated the cPanel’s version. I have monitored the server almost whole day.

They claimed they have released the second version of VPS Optimized which saves 12-15MB RAM. But at what cost?

I am monitoring one of my VPSes from yesterday. Still I am observing that the server load is consistently more than double than before. So, did they save memory at cost of CPU? Usually my VPS’s load always (except special tasks like backup) remained under 1.0 and mostly below 0.6. But now it is always more than 1.5 and mostly 2.0+.

In VPS arena, RAM is easily upgradeable but not the CPU. Many company provides equal CPU share. So, when needed, we can upgrade the RAM but can’t upgrade the CPU share easily and cost effectively.

So, I am really frustrated with this version of cPanel.

How to submit a form using PHP (cURL, fsockopen)

How to submit a form using PHP

There are situations when you want to send data using POST to a URL, either local or remote. Why would you want to do this? Probably you want to submit data to an optin form, but without taking a valuable visitor away from your site. Or maybe you want to send data to several applications for various purposes, which would be impossible to do in the usual manner. So how can we deal with this problem?

Simulate submitting a form using cURL

So what is cURL anyway? cURL stands for “Client URL”, and it is a library of functions that can be used to connect and communicate to a wide range of servers, such as HTTP, FTP, telnet and so on. cURL also speaks HTTPS, so it can be used to communicate with secure servers.

What are we going to use are cURL HTTP capabilities. cURL supports POST and GET methods, file uploads, cookies, user/password authentications, even using proxy servers for connecting.
Continue reading →

Installation and configuration of SHOUTcast is fun!

Today one of my online junior friend requested me to install and configure SHOUTcast for him. Though I had no previous experience on it, I became interested to take the challenge. Before starting, I dug internet a bit and found a helpful tutorial. I started the work and found it is very easy. It took not more than 30 minutes to complete the study & setup.

Here is the steps I followed in shell:
#useradd shoutcast
#cd /home/shoutcast
#su shoutcast Continue reading →

Red5 installation never been easiest!

Several times I have tried to install Red5 Streaming server in my linux box and I successfully failed during every try.

Today from morning I again started to try as success was my sheer determination. I planed I would surely find out a positive result. But no hope. I again failed to install it.

Later, while searching online, I have found a magic script. i instantly downloaded the file and executed it. Within a few minutes, Red5 is installed successfully. Thats really magic. I just run service red5 start and its started.

To get details visit:

To download the magic file click here.

Make it executable (755) and execute it (./red5_install). And count for success. Thanks a lot to the author for a fantastic script.

Optionally I have upload that script here for backup storage. You can download from here.

How to flush DNS cache in Linux / Windows / Mac

Flush dns to get a new name resolution. Also flush dns cache when you can’t access a newly registered domain name. You can simply flush your dns cache anytime to get new entry. So, Flush your dns cache now.

To flush DNS cache in Microsoft Windows (Win XP, Win ME, Win 2000):-

– Start -> Run -> type cmd
– in command prompt, type ipconfig /flushdns
– Done! You Window DNS cache has just been flush.

To flush the DNS cache in Linux, restart the nscd daemon:- Continue reading →