<?
$url 
$_REQUEST[url];
?>
<html>
<body>
<form>
<center>
Enter image URL: 
<input type="text" name="url" value="<? echo "$url";?>" />
<input type="submit" />
</center>
<?

/* Converts $url into an array then a list of variables */

if ( isset($url) )
{
list(
$width$height$type$attr) = getimagesize("$url");
if ( 
$type == )
  { 
$type =gif ;}
if ( 
$type == )
  { 
$type jpg;}
if ( 
$type == )
  { 
$type png;}
if ( 
$type == )
  { 
$type swf ;}
echo 
"<textarea width=\"100%\" growable>";
echo 
"<img src=\"$url\" $attr />\n";
echo 
"File type = $type";
echo 
"</textarea>";
}
?>
</form>
</body>
</html>