Another way of doing it is.
<?
$theimage="http://212.19.87.14/clankhaine/images/head.gif";
$filename="head.gif";
$fpr=fopen($theimage,"r") or die();
$fpw=fopen($filename, "w") or die();
$imgin="";
while (!feof($fpr) )
{
$imgin.=fread($fpr, 100);
}
fwrite($fpw, $imgin);
fclose($fpr);
fclose($fpw);
$theimage=$filename;
list($height, $width)=getimagesize($theimage);
echo "height is ".$height."<BR>";
echo "width is ".$width."<BR>";
if ( $width > 300 )
{
$ratio=300/$width;
$height=$height/$ratio;
$width=300;
echo "<IMG height=".$height." width=".$width." src=\"".$theimage."\">";
}
else
{
echo "<IMG src=\"".$theimage."\">";
}
?>
Not an ideal way of doing it but it does work.
Mark.