- file_get_contents: documentation ( source)
- var_dump: documentation ( source)
- ini_set: documentation ( source)
- error_reporting: documentation ( source)
<?php
ini_set('display_errors', 1);
error_reporting(-1);
var_dump($_FILES);
$tmpImage = file_get_contents($_FILES["file"]["tmp_name"]);
$theImage = imagecreatefromstring($tmpImage);
var_dump($theImage);
$imageColors = imagecolorstotal($theImage);
var_dump($imageColors);