Anonymous
public php v1 · immutablefunction calc($msg, $irc){ $url = file('http://www.google.com/search?q='.urlencode(str_replace("!calc\s", '', $msg)).'&calc=1'); foreach ($url as $line => $str) { if(preg_match("#.*<td nowrap><font size=\+1><b>(.*)</b></td>.*#iU", $str, $result)) { break; } } $irc->send_to_channel("{$msg->user}, {$result[1]}", $msg->channel);}