PHP Google Translate function

function google_trans($text,$sl = ‘en’,$tl = ‘zh-TW’)
{
$url = “http://translate.google.com.hk/translate_t?sl={$sl}&tl={$tl}&text=”.urlencode($text);
ini_set ( “user_agent”, “Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)” );
if(@$HTML = file_get_contents($url))
{
$tt0 = split(‘

‘,$HTML);
$tt1 = split(‘

‘,$tt0[1]);
return $tt1[0];
}
else
return false;
}