Fender963 Posted September 2, 2007 Share Posted September 2, 2007 I am having some troubles with getimagesize() and remote images. It works, but very very slowly. Time taken for a local image isn't noticeable. Time taken for a remote image can be anywhere from 1-2 minutes. I know it's not the remote server because doing a simple <img src="http://www.remote.com/image.jpg"> takes neglible time. From what I've read this doesn't seem to be an uncommon problem but I'm having trouble finding a solution. Anyone have a workaround for this? PHP 4.4.4 Thanks for the help! - Kyle Link to comment https://forums.phpfreaks.com/topic/67607-getimagesize-extremely-slow-with-remote-images/ Share on other sites More sharing options...
Fadion Posted September 2, 2007 Share Posted September 2, 2007 I read somewhere that its a server problem, but dont know what to tell though. If u can give the url to the remote image, so we can try it. Link to comment https://forums.phpfreaks.com/topic/67607-getimagesize-extremely-slow-with-remote-images/#findComment-339622 Share on other sites More sharing options...
Fender963 Posted September 2, 2007 Author Share Posted September 2, 2007 It works with any remote image but here is one: http://www.zooplus.co.uk/bilder/1/5161_nutro_adult_lr_1.jpg - Kyle Link to comment https://forums.phpfreaks.com/topic/67607-getimagesize-extremely-slow-with-remote-images/#findComment-339624 Share on other sites More sharing options...
Fender963 Posted September 2, 2007 Author Share Posted September 2, 2007 I just ran some tests with getimagesize(), fopen, and with cURL and here are the results for a remote image: CURL Script timer: 28.818582 seconds. FOPEN Script timer: 23.664872 seconds. getimagesize Script timer: 24.743154 seconds. I then tried it with a local image and here are the results: CURL Script timer: 0.000729 seconds. FOPEN Script timer: 0.000127 seconds. getimagesize Script timer: 0.000164 seconds. Link to comment https://forums.phpfreaks.com/topic/67607-getimagesize-extremely-slow-with-remote-images/#findComment-339626 Share on other sites More sharing options...
Fadion Posted September 2, 2007 Share Posted September 2, 2007 After like 10 attempts, i got 1.38674402237 max time with getimagesize() with your posted image. Dont know why at your side is taking so much. Link to comment https://forums.phpfreaks.com/topic/67607-getimagesize-extremely-slow-with-remote-images/#findComment-339638 Share on other sites More sharing options...
Fender963 Posted September 2, 2007 Author Share Posted September 2, 2007 Do you know what version of PHP you are running? i have heard that 5 does not have a problem. Link to comment https://forums.phpfreaks.com/topic/67607-getimagesize-extremely-slow-with-remote-images/#findComment-339815 Share on other sites More sharing options...
Fadion Posted September 2, 2007 Share Posted September 2, 2007 5.2.1 on a local machine. U can always upgrage. There are a lot of hosting companies who sell shared hosts with php5. Link to comment https://forums.phpfreaks.com/topic/67607-getimagesize-extremely-slow-with-remote-images/#findComment-339845 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.