Jump to content

Looking for a Photo Upload Script?


Skipjackrick

Recommended Posts

I've searched the internet up and down trying to find a photo upload script that is better than what I currently have.  I can't find anything that really does what I need.

 

Here is what I am looking for.

 

A script that will allow the user to upload an image from their camera up to 10 MB.

 

Then,

 

Resize the photo to a specified size.  And make the file a JPG image.

 

Then, Rename it to a custom name for example

 

<?php
// make a note of the directory that will recieve the uploaded files
$uploadsDirectory = $_SERVER['DOCUMENT_ROOT'] . $directory_self . 'submitted_pics/';

$now = time();

// make a unique filename for the uploaded file
$uploadFilename = $uploadsDirectory.$now.'_angler'.$anglerId.'_team'.$team.'.jpg';


// now move the file to its final and allocate it with the new filename
@move_uploaded_file($_FILES[$fieldname]['tmp_name'], $uploadFilename)
or error('receiving directory insuffiecient permission', $uploadForm);
?>

 

However, I need the upload script to be able to keep the exif data intact because I use this function later to display important information.

 

<?php
$directory = $_SERVER['DOCUMENT_ROOT'];

$exif_data = exif_read_data ('' . $directory . '/submitted_pics/' . $image . '');
?>

 

 

 

 

Do any of you guys know of a decent script that I could get some ideas from?  I've been reading php.net on this stuff and can't seem to get a good output from anything I do. 

 

Any help is greatly appreciated.

Link to comment
https://forums.phpfreaks.com/topic/191385-looking-for-a-photo-upload-script/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.