Setting Timeout Value for file_get_contents in PHP

Sometimes you need to avoid using cURL for getting external web content for any reasons. You’re lucky that PHP has some built-in functions that allow you to get data from the Web without cURL. But if you are using default values, there is no option to set the timeout for a operation and it’s sometimes annoying. In order… Read More »

How to Install the Right Version of Java to Run Selenium on a CentOS Server

If you want to launch Selenium on a Linux server, you need to have Java support installed. If your Java version is lower than 1.6, most probably you will get the following error while trying to launch Selenium: [root@ns1 selenium]# java -jar /usr/local/bin/selenium-server-standalone-2.41.0.jar -role hub May 27, 2014 2:06:12 p.m. org.openqa.grid.selenium.GridLauncher main INFO: Launching a selenium grid server… Read More »

SQL Command to Change Column Order in a MySQL Table

Sometimes you need to change column order in a table. If you don’t have access to latest phpmyadmin version (4.0 and above), you don’t have any graphic solution to do this and you’ll have to use an SQL query. First of all, you need to identify the type of field you want to move. It should look like… Read More »