note 35018 added to function.getimagesize
| From: | justin at webtekconcepts dot com | Date: | Fri, 15 Aug 2003 18:27:31 +0000 |
| Subject: | note 35018 added to function.getimagesize | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-54227@lists.php.net to get a copy of this message | ||
For those that like to go the dynamic thumbnail route, I've found that you can get warnings
with getimagesize() after your loop through more than 3 to 4 images. In my case I needed 12 images
on each page.
Use usleep() in your loop just before you run getimagesize() otherwise you'll end up with
warnings, big images and a broken page. Using usleep() lets the server recoup for X milliseconds so
it will accept connections again for the image size.
I've found that usleep(1500) is the best for my situation. This barely slows the page down and
allows for getimagesize() to work 100% of the time for me.
----
Manual Page -- http://www.php.net/manual/en/function.getimagesize.php
Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+35018
Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+35018&report=yes
Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+35018&report=yes