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? Quote Link to comment 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 } } ?> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.