Subscribe for updates on posts
Be the first to read the latest news

Rightsflow acquired by Google

January 13th, 2012 by Ioan Cocan in General, PHP, Startup

Congrats to the Rightsflow team for the recent acquisition by Google. We are glad that we were able to bring our contribution to this success. Tremend provided software services for implementation of Limelight (, Rightsflow’s main licensing tool.

Limelight allows music licesing for the song you want to cover either in digital, physical, streaming or ringtone format. You can enter the song information, pay the royalty fees and you will receive a PDF license after Rightsflow’s licensing department verifies the copyright ownership and pays the royalties on your behalf. The solution integrates with PayPal Pro for payment processing. You can also bulk upload songs for a faster experience.

Good luck to Rightsflow team, now part of YouTube!

MySql, PHP and UTF8

September 26th, 2006 by Iulian Cutui in PHP

Nowadays UTF8 is far from being just “trendy”, it’s the de facto standard for information representation. There are a lot of discussions on the “why locales are bad” theme, and I’m not going to argue with that.

Getting right to the point, how can you use UTF8 in your PHP/MySql web app? First things first: use PHP 5 and MySql 4.1 as minimum requirements. The reason is the same for both of these apps: native/decent UTF8 support.

For MySql, define your tables with UTF8 character set and collation:

CREATE TABLE table_name (


) CHARACTER SET utf8 COLLATE utf8_general_ci;

For PHP, set the UTF8 encoding before extracting your information from MySql

if (!$link = mysql_connect(‘mysql_host’, ‘mysql_user’, ‘mysql_password’)) {

echo ‘Could not connect to mysql’;


if (!mysql_select_db(‘mysql_dbname’, $link)) {

echo ‘Could not select database’;

$sql = “SET NAMES ‘utf8′”;
mysql_query($sql, $link);

//select your UTF8 data
$sql = “SELECT foo FROM table_name”;
$result = mysql_query($sql, $link);if (!$result) {

echo “DB Error, could not query the database\n”;
echo ‘MySQL Error: ‘ . mysql_error();


If you need to process your UTF8 strings use the multi-byte versions of the string functions (they have the same name but a “mb_” prepended, e.g. mb_substr) as they work at the character level rather than the byte level.

For omitting the string encoding parameter that can be passed to the multi-byte string functions is useful to set the default encoding to UTF8 by issuing: