rendered paste body<?php
$word = $_GET['word'];
$c1 = "\003";
$c1 .= $_GET['c1'];
$c2 = "\003";
$c2 .= $_GET['c2'];
$file = file_get_contents("http://dictionary.cambridge.org/define.asp?key=".$world."*1+0&dict=A");
if ($world != true) { echo "You must specify a word, like this: dictionary.php?word=WORD"; }
if (strpos($file,"No entry was found") == TRUE) { return "Sorry, I couldn't find your word :("; }
else {
preg_match_all("/<span class='def-definition'>(.*?)<\/span>/i",$file,$matches);
echo $c1. chr(91). $c2. DEFINE. $c1. chr(93);
echo $c2. $matches[1][0];
}
php?>