function cleankeyword($x) { $x = str_replace(array("\\\\'", "\\'", "\\'", 'Ã'), array("'", "'", "'", 'à'), $x); $x = ytrim(str_replace(array('*', '†', '%20', 'http:', 'www.', '%22', '"', '...', 'www.', '%c3%a9', '&q=', '+', '%2520', '?', '|', '{', '}', '(', ')', '&', '/'), ' ', $x)); return str_replace(' ', ' ', $x); }
function Tridecoder($mots) { $mots = strtolower($mots); $x = preg_split("~Ð|Ä°|us\\.mg|1rachat|i2b con|creditimmo\\.o|dc10\\.fr|sex66\\.fr|#~", $mots); if ($x[0]) { $mots = $x[0]; } $mots = preg_replace("~\\.?(ch|be|it)\\.?\$~", '', $mots); while (Preg_Match("~%~", $mots) and $i < 2) { $mots = Urldecode($mots); $i++; } while (Preg_Match("~â|ã|±|€|©|ª~i", $mots) and $n < 3) { $mots = utf8_decode($mots); $n++; } $a = array('€', 'à¨', 'é'); $b = array('€', 'è', 'é'); $mots = str_ireplace($a, $b, $mots); #Foreach($a as $v)if(stripos($mots,$v))//3rd pass return ytrim($mots); }