note 35018 deleted from function.getimagesize by cmb
| From: | cmb@php.net | Date: | Sun, 18 Dec 2016 09:39:11 +0000 |
| Subject: | note 35018 deleted from function.getimagesize by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-208627@lists.php.net to get a copy of this message | ||
Note Submitter: justin at webtekconcepts dot com
----
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.