PHP Classes

File: test_img_info.php

Recommend this page to a friend!
  Packages of Mike Jordan   PHP Image cURL   test_img_info.php   Download  
File: test_img_info.php
Role: Example script
Content type: text/plain
Description: Demo script
Class: PHP Image cURL
Emulate getimagesize function remotely using cURL
Author: By
Last change: Updated to current version
Date: 4 months ago
Size: 349 bytes
 

 

Contents

Class file image Download
<?php

include 'img_info.php';
  
$info = img_info::getimageinfo("https://some_site.com/dir/image.jpg");
 
if ($info !== false) {
   print_r( $info );
} else {
   echo "Error - Unable to get image information";
}

//Array ( [0] => 73 [1] => 116 [2] => 2 [3] => width="73" height="116" [bits] => 8 [channels] => 3 [mime] => image/jpeg )