How to tar.gz

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 »

How to backup and restore PuTTY settings

PuTTY is a free implementation of Telnet and SSH for Win32 and Unix platforms, along with an xterm terminal emulator. It is written and maintained primarily by Simon Tatham. Official PuTTY site is: http://www.chiark.greenend.org.uk/~sgtatham/putty/. PuTTY is an open source software and its free, licensed under MIT license. I’ve been using PuTTY for years, its easy to use. So far, only…

Read More »

How to check validity of an URL

How to check validity of an URL. 1. Using Regex if (ereg(“^(http|https|ftp)\://[a-zA-Z0-9\.-]+\.[a-zA-Z0-9]{1,3}(:[a-zA-Z0-9]*)?/?([a-zA-Z0-9\._\?\,\’/\\\+&%\$#\=~-])*$”, $url)) { echo ‘URL Correct’; } else { echo ‘Bad URL’; } This will validate URL with http, https and ftp schema. 2. Using fsockopen $url = parse_url($url); $conn = fsockopen($url[‘host’], 80); if (!$conn) die(‘Cannot connect!’); fwrite($conn, “GET {$url[‘path’]} HTTP/1.0\r\nHost: {$url[‘host’]}\r\nConnection: close\r\n\r\n”); $header = fgets($conn); if (preg_match(‘|HTTP/\S+\s+[2-3]\d\d|i’, $header))…

Read More »

inLinks first impression review

First, I was registered user at text-link-ads.com (TLA). While I’m not very active using TLA, I do sometimes got emails from them. Mostly an announcement email regarding their new product. On Nov 20, I got the following email from TLA: Hello, we are excited to announce our newest publisher offering www.inLinks.com inLinks allows you to sell simple text link ads…

Read More »