Eminem Posted December 13, 2007 Share Posted December 13, 2007 I want to make an input box where users will place a URL of an image in. How do I make it so that PHP checks if it's a PNG and if it has a certain height and width in an if statement? Link to comment https://forums.phpfreaks.com/topic/81584-solved-get-php-to-check-a-certain-images-dimensions/ Share on other sites More sharing options...
phpSensei Posted December 13, 2007 Share Posted December 13, 2007 <?php $site = $_POST['IMAGE_URL']; list($width, $height, $type, $attr) = getimagesize($site); if($type == "image/png"){ // not so sure about this if(($height == 100)&&($width == 100)){ // do something } } ?> Link to comment https://forums.phpfreaks.com/topic/81584-solved-get-php-to-check-a-certain-images-dimensions/#findComment-414301 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.