trying to create upload page.

1st need help geting image size for ex 199mb or kb etc..
2nd resolutiion 1000x39 etc
3rd how can get more information about the image.or camra for ex make, model, Aperture, ocal Length.
4th how to get date when its sumbited

for some reason it is storing the word "ARRAY" in $image_size.

$image_size = getimagesize($_FILES['fileupload']['tmp_name']);


$file = isset($_FILES['fileupload']) ? $_FILES['fileupload']['tmp_name'] : false;

$image = chunk_split(base64_encode(file_get_contents($_FILES['fileupload']['tmp_name'])));    //works fine
$image_full_name = $_FILES['fileupload']['name'];                                                                       //works fine
$image_size = getimagesize($_FILES['fileupload']['tmp_name']);                                                  //dont work
$image_res = ..... ([fileupload][tmp_name])
$image_date= ...()                

many thanks

Member Avatar for diafol

This is because $image_size IS an array - you have $image_size[0] for the width and $image_size[1] for the height. ANd more besides - read the manual:

oh thanks alot. know i got how to find height and width but i dont know how to find size. for ex 200k or 499mb etc.

Member Avatar for diafol

In bytes:

echo filesize($file);
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.