1

(5 replies, posted in Programming)

  $string = "http://static.php.net/www.php.net/images/php.gif";
  echo $string . " = " . urlencode($string) . "<br /><br />\n";

  list($width, $height, $type, $attr) = getimagesize($string);
  echo "<img src=\"" . $string . "\" $attr alt=\"getimagesize() example\" />   width = " . $width . "   height = " . $height;
  echo "<b>resized:</b> <img src=\"" . $string . "\" ";
  if($width >= $height) {
     echo "width=\"100\"";
  } elseif($width < $height) {
     echo "height=\"100\"";
  }
  echo ">";