Curl HTTP Client 2.0

It’s been a while since I last updated my Curl HTTP Client class. That’s the class that we’ve been using for years now, for all kinds of site scrapping, bulk domain registration without API, … and even today we use it as a part of core in our brand new Payment system.

Since I had some spare time this weekend, I finally managed to merge some of updates we’ve created during all these years and put a class to github so I can do frequent updates regularly. Don’t worry, class has retained most of it’s previous functionality explained here so update to latest version shouldn’t cause any problem.

Here’s the GitHub page: https://github.com/dinke/curl_http_client. Feel free to use it in your own projects and send in your comments.

Browser Detection Update

Long time ago I developed Browser Detection Class which is able to recognize most of popular browser/OS’s used today.

For example FF on my macbook pro would be recognized like this:
Mozilla Firefox 3.0.4 / Mac OS X

Very useful stuff in case you have to redirect your users to different pages depending of browser version or to maintain your own site browser/os usage statistics.

Today I had a chance to update it with support for Windows Vista, Google Chrome and iPhone.

You can download complete code with usage examples by following this link.

Crossover Lame Duck Challenge

Crossover (previously known as Crossover Office) is bunch of applications that allows you to run native Windows applications on Linux, Mac OS X and Solaris without need of purchasing Microsoft Windows. Really great bunch of tools that allow you to run applications like Microsoft Office or Dreamweaver on Linux easily without hasle of setting up Wine.

Today guys from CodeWeavers have decided to make CrossOver FREE, you can get registration key and it will act in a same way like you purchased application. But even more interesting than giving it for free is reason why they are doing that.

Read more info here :)

MySQL 5.x – Finally improved client

Looking at my favorite rss feeds today, I found this post on great MySQL Performance Blog:

…if you press CTRL-C MySQL Command Line Client will not exit but will terminate query being executed.

In other words, in previous versions of MySQL client program, if you issue a query and try to interrupt it by hitting CTRL-C, CTRL-C would actually kill MySQL client itself, but query still continue running in background! In this case the only solution to really kill that query is to find it’s ID on process list (by issuing “show full processlist” query), and then to kill it with a query like “kill 12345″, where 12345 is ID of query that you want to be killed. In other words, something like this:

mysql> select * from odm_result_keywords where keyword like '%foo%joe%';
^CAborted
bash-2.05b$ mysql -A --enable-local-infile -udinke -ppass mydb
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1512 to server version: 4.1.18-log

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> show full processlist;
+------+-------+----------------------------+-------------------+---------+------+--------------+--------------------------------------------------------------------+
| Id   | User  | Host                       | db                | Command | Time | State        | Info                                                               |
+------+-------+----------------------------+-------------------+---------+------+--------------+--------------------------------------------------------------------+
| 1486 | dinke | localhost                  | mydb | Query   |    3 | Sending data | select * from odm_result_keywords where keyword like '%foo%joe.cl' |
+------+-------+----------------------------+-------------------+---------+------+--------------+--------------------------------------------------------------------+
1 row in set (0.00 sec)

mysql> kill 1486;
mysql>

Thanks to changes in MySQL client program, all you have to do now is to hit CTRL-C, and query will be stopped immediately:

mysql> select domain from odm_result_keywords_de where whois_status is null and domain like '%.%.%';
Query aborted by Ctrl+C
ERROR 1317 (70100): Query execution was interrupted
mysql>

For more information about this feature (as well as other changes in MySQL 5.0.25) please follow this link.

PHP 5.2.0 Released

New release of PHP 5.2.0 is available for download.

Along with plenty of bugfixes, new release bring us some interesting features, the most interesting among them are hooks for tracking file upload progress , as well as new ZIP extension for creating and editing zip files.

More informations about this release can be found in the release announcement 5.2.0.

Next Page »