Cache like a Pro with Memcached
Every application have a bottle neck. It might be a database query, request to an external service, hard drive I/O or an expensive algorithm. Even if the software is running smoothly it might be necessary to optimise in order to handle higher traffic. Significant part of optimisation is caching.
Creating a Chat server in PHP with sockets, forks and pipes
In my previous post I showed how to create a multi process socket server in PHP with pcntl_fork. This time I’m going to extend this example and write a chat server. Chat is far more challenging because you not only have to handle simultaneous connections but also allow communications between processes. Inter process communication (IPC) […]
Multi threaded Socket Server in PHP with fork
When you create your first socket server you will quickly realise that one thread is not enough. In a single thread architecture a server can’t handle more then one connection at the time. It’s undesired because in most cases there will be simultaneous connections.
Boost productivity with Eclipse shortcuts
Have you ever wondered how to improve productivity? There are many ways which requires different level of commitment and time to learn. One of the simplest yet very powerful is taking advantage of keyboard shortcuts in your IDE.
Connecting PHP with Arduino via serial port on Linux
Arduino changed the word. Everybody can make an astonishing project without a degree in electronic. If you are a programmer soon or later you will get an idea of connecting it to a computer. If you are a PHP programmer you will most likely want to use PHP to talk to the Arduino.
PHP Deamon
Not every problem can be solved with an aid of a cronjob. Sometimes a real time background process is required. The most common approach is to create an ordinary script and run it from command line with “&” character at the end.