How to check ICQ number validity?
This will validate ICQ ID (number only). if (ereg(“^[0-9]{6,15}$”, $icq)) { echo ‘Valid’; } else { echo ‘Invalid; }
Read More »This will validate ICQ ID (number only). if (ereg(“^[0-9]{6,15}$”, $icq)) { echo ‘Valid’; } else { echo ‘Invalid; }
Read More »Don’t know how to transfer your domain out of GoDaddy? Can’t find how to get your domain EPP / Authorization Code from GoDaddy cluttered and irritating domain control panel? I feel your pain, I just recently transferred a domain out of GoDaddy. The domain in question transferred in 3 hours since the minute I initiate the transfer. This is how…
Read More »Sometimes you need an easy way to count number of lines in a text file. For example, how many lines in a .csv file. Easy: wc -l somefilename.csv You can also count number of characters in a file using “wc”: wc -m somefilename.txt Or number of words: wc -w somefilename.txt Explore the possiblities of “wc”: # wc –help Usage: wc…
Read More »This will validate most email address. if (ereg(“^[_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*@+([_a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]{2,200}\.[a-zA-Z]{2,6}$”, $email)) { echo ‘Email valid’; } else { echo ‘Email invalid; }
Read More »tar is a program which combine several files into one (eg: files.tar). gz or gzip is a program to compress files (eg: files.gz). Both are Linux programs. A tar.gz file is a resulting file from several files combined together and then compressed. To combine and compress a folder: tar czf filename.tar.gz /path/to/some/folder To extract a tar.gz file: tar -zxvf filename.tar.gz…
Read More »Your server logs killing you? Not anymore, here is a quick way to truncate the big log file to zero (make it empty). Command: cat /dev/null > [some_file] Example: cat /dev/null > /var/log/message This will truncate /var/log/message file.
Read More »