Unicode keyword translation
Mon, 05/09/2011 - 11:41 — sandipDo you see garbled text, unicode keywords in your referral web stats reports like below?
à ¹€à ¸£à ¸µà ¸¢à ¸⠄¢ à ¸—à ¸µà ¹ˆà ¹„à ¸ «à ¸™
Use the below url for the conversion:
Here is the simple php source code that uses google translate for translation to English:
<?php header("Content-Type: text/html; charset=iso-8859-1" n style="color: #007700">); ?>r />
<html>
<head>
<title>Unicode keyword translation</title>
</head>
<body>
<br />
Copy/paste unicode keyword:
<br />
<br />
<form action="convert_keywords. php">
<input size="100" name="input" value="<?= $_GET['input']; ?>" type="text">
<input value="Go" type="submit">
/> </form>
<br />
<br />
<?php
$pieces=explode("=", $_SERVER['QUERY_STRING' ]);
$query=$pieces[1];
$translate_url ="http://translate.goo gle.com/?hl=en#auto|en|" . $query;
if(!empty($query)) {
?>r />
<iframe src="<?= $translate_url; ?>" width="100%" height="100%">
/> Iframe unsupported...
</iframe>
<?php } ?>r />
</body>
</html>
- sandip's blog
- Login or register to post comments
- Read more