Showing posts with label Check. Show all posts
Showing posts with label Check. Show all posts

Saturday 23 June 2018

How to check image is valid or not in php from URL in PHP

$imagePath = "https://jaydip.kansagra.com/image.jpg";
if (@getimagesize($imagePath)) {
   echo 'Image exists';
} else {
      echo 'Image not exists';
}