title: php getimagesize of dynamically created picture
body: <p>I am trying to determine if image.php is valid picture file. It may be or may be not because if DB has information about resized picture it is going to be valid - image.php will resize original picture and print it to the screen. There is also alternative - there is no filename information in database and it can result error message or error picture. I'd like to get dimensions of image and if it is width = 0 and height = 0 then print error message. I was trying to do it with getimagesize but it produces error:</p>
  
  <p>[function.getimagesize]: failed to open stream: No such file or directory in ...</p>
  
  <p>Path is 100% correct. I've read that it is impossible to getimagesize of dynamically made picture via php. I always can check my database but i am curious if there is any hack to get image size that is dynamically created via php. </p>
  
  <p>Code:</p>
  
  <pre><code>$file = "image.php?img=1";
  $a = getimagesize($file);
  echo 'aaaaaaaaa' . $a;
  </code></pre>
  
  <p>EDIT:</p>
  
  <p>I did it another way because none of the solutions worked for me - i just check database for correct filename existance. </p>
  
  <p>Thanks for help.</p>