Reading from standard input and writing to standard output or standard error using PHP

One of the most common command line tricks in Linux is to chain multiple commands using the pipe symbol i.e. you feed the output of one command as the input of another. This is called standard input and standard output redirection. PHP is usually used to program for the web but it can also be used as a shell scripting language to automate tasks and like any good shell scripting language it is possible to read from standard input and write to standard output using PHP.

Continue reading

2011: Lost year of Internet bandwidth upgrades in Pakistan?

A few years ago PTCL decided that they wanted to get into the broadband Internet Service Provider (ISP) game. PTCL being PTCL they went about it in the only manner they could. They had this huge phone network with questionable infrastructure. And they didn’t really have the right personnel. But they had financial muscle and an almost monopoly on international bandwidth. So they advertised heavily offering lower rates and higher speeds than their competitors. It worked for them. They got lots and lots of customers. Some of them even happy ones.

Continue reading

International payment methods for Pakistan: SWIFT wire transfer

Sending money abroad and receiving payments from foreign companies or individuals is surprisingly difficult in Pakistan. There are many factors that come into play including the cost of the payment method, time it takes to transfer the amount and acceptability of the payment method to the foreign party. In this post I look at SWIFT wire transfer and discuss its advantages and disadvantages. Continue reading