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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.