'; $r = ''; $response = between($d, $l, $r); $response = strip_tags($response); $response = str_replace(" ", "%20", $response); $ua = 'Mozilla/5.0'; $url = 'http://babelfish.altavista.com/tr?doit=done&intl=1&lp=de_en&tt=urltext&trtext='.$response; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_HEADER, false); curl_setopt($ch, CURLOPT_USERAGENT, $ua); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $d = curl_exec($ch); curl_close($ch); $l = '
'; $r = '
'; $response = between($d, $l, $r); $response = strip_tags($response); $response = str_replace(" ", "%20", $response); $ua = 'Mozilla/5.0'; $url = 'http://babelfish.altavista.com/tr?doit=done&intl=1&lp=en_zh&tt=urltext&trtext='.$response; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_HEADER, false); curl_setopt($ch, CURLOPT_USERAGENT, $ua); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $d = curl_exec($ch); curl_close($ch); $l = '
'; $r = '
'; $response = between($d, $l, $r); $response = strip_tags($response); $response = str_replace(" ", "%20", $response); $ua = 'Mozilla/5.0'; $url = 'http://babelfish.altavista.com/tr?doit=done&intl=1&lp=zh_en&tt=urltext&trtext='.$response; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_HEADER, false); curl_setopt($ch, CURLOPT_USERAGENT, $ua); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $d = curl_exec($ch); curl_close($ch); $l = '
'; $r = '
'; $response = between($d, $l, $r); $response = strip_tags($response); if(strlen($response)>500) { fputs($c, "PRIVMSG $chan :$nick: Don't know.\n"); } else { fputs($c, "PRIVMSG $chan :$nick: $response\n"); } continue; } $ua = 'Mozilla/5.0'; $url = 'http://babelfish.altavista.com/tr?doit=done&intl=1&lp='.$pair.'&tt=urltext&trtext='.$phrase; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_HEADER, false); curl_setopt($ch, CURLOPT_USERAGENT, $ua); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $d = curl_exec($ch); curl_close($ch); $l = '
'; $r = '
'; $response = between($d, $l, $r); $response = strip_tags($response); if(strlen($response)>500) { fputs($c, "PRIVMSG $chan :$nick: Don't know.\n"); } else { fputs($c, "PRIVMSG $chan :$nick: $response\n"); } break; default: $query = str_replace(' ', '+', $query); $ua = 'Mozilla/5.0'; $url = 'http://www.google.com/search?hl=en&q='.$query.'%3F&btnG=Google+Search'; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_HEADER, false); curl_setopt($ch, CURLOPT_USERAGENT, $ua); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $d = curl_exec($ch); curl_close($ch); $l = ' — '; $r = '
'; $response = between($d, $l, $r); $response = strip_tags($response); if(strlen($response)>500) { fputs($c, "PRIVMSG $chan :$nick: Don't know.\n"); } else { fputs($c, "PRIVMSG $chan :$nick: $response\n"); } break; } } } fclose($fp); ?>