So, I looked over your code, and I couldn't find anything wrong with it.
I think the problem lies with file_get_contents(), and I believe either its just resetting the file request or something. So, I tried the cUrl, which I figured would work better with this kind of thing anyway.
Also, I would suggest using a regular expression for this as well, instead of explode(). Mainly because not only should it be faster, but you can do it in one function call as well. Anyway, this is what I got.
CODE
<?php
if(isset($_POST['definetextarea'])){
$theunexplodedwords = htmlentities($_POST['definetextarea']);
$theexplodedwords = explode("\n", $theunexplodedwords);
$fatso = count($theexplodedwords);
ini_set('default_socket_timeout', 120);
// Open a new cUrl
$cURL = curl_init();
// Tell the cUrl to return the result instead of printing it!
curl_setopt($cURL,CURLOPT_RETURNTRANSFER,1);
for($skinny=0;$skinny<$fatso;$skinny++){
unset($x);
$url = "http://dictionary.reference.com/browse/$theexplodedwords[$skinny]";
// Set the URL of the cUrl
curl_setopt($cURL,CURLOPT_URL,$url);
// Get the result of the call...
$x = curl_exec($cURL);
// Check and see if its empty
if(!empty($x)){
// Here is my regular expresion, basically it finds the location of the '1.' and copys whats after it
preg_match("/1\.<\/td>(.*)<\/td>/U",$x,$res);
// This strips the HTML tags off the result, so that we only see the text
$definition = strip_tags($res[1]);
echo "$theexplodedwords[$skinny] - $definition <br>"; } }
// Close the cUrl
curl_close($cURL); }
else{
echo <<<HTMLONE
<html>
<head><title>Multi-Word Definer</title></head>
<body>
<p align='center'>
Type in one word per line.
<br>
The Multi-Word Definer will define each word.
<br>
The definitions are from <a href="http://dictionary.reference.com/">Dictionary.com</a>.
<form name='defineform' action='$PHP_SELF' method='POST'>
<center><textarea name='definetextarea' rows='10' cols='20'>Enter words here</textarea></center>
<center><input type='submit' value='Define!'></center>
</form>
</p>
</body>
</html>
HTMLONE;
}
?>
Hope that works for you!