Login   Register  
PHP Classes
elePHPant
Icontem

PHP Image cURL: Emulate getimagesize function remotely using cURL

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Info   View files View files (4)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings  
2014-06-08 (5 months ago) RSS 2.0 feedNot yet rated by the usersTotal: 462 This week: 2All time: 5,520 This week: 966Up
Version License PHP version Categories  
image-curl 1.0.1Custom (specified in a ...5.4PHP 5, Graphics, Files and Folders, W...
Description Author  

This class can emulate getimagesize function remotely using cURL.

It can retrieve an image file from a remote server using the cURL extension to send HTTP requests to that server.

The class implements a function that works like the original PHP getimagesize, except that it works for getting the image size and image type metadata of images retrieved from remote servers where fopen wrappers are disabled in the PHP configuration.

Besides the original getimagesize function metadata, it also returns the image file size.

Innovation Award  
PHP Programming Innovation award nominee
May 2014
Number 2


Prize: One copy of the Zend Studio
The getimagesize function is very useful to get the dimensions of images read from local or remote files.

However, if the fopen wrappers are disabled in the current PHP configuration, getimagesize cannot get the dimensions of remote images.

This class implements an alternative solution that relies only on the cURL extension.

Manuel Lemos
Picture of Mike Jordan
Name: Mike Jordan <contact>
Classes: 4 packages by
Country: United States United States
Age: 51
All time rank: 1960253 in United States United States
Week rank: 43 Up3 in United States United States Up
Innovation award
Innovation award
Nominee: 1x

  Files folder image Files  
File Role Description
Plain text file img_info.php Class Image class to simulate the getimagesize function
Accessible without login Plain text file license.txt Lic. zlib/libpng License
Accessible without login Plain text file readme.txt Data Class Information
Accessible without login Plain text file test_img_info.php Example Demo script

 Version Control Reuses Unique User Downloads Download Rankings  
 0%1Total:462All time:5,520
 This week:2This week:966Up