Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Old 09-05-2005, 03:24 PM script needed
Experienced Talker

Posts: 49
Trades: 0
hi, i was wondering if there is a script that just lets users upload files and then immediately add the files as a download to my page.

just with a form like:
Author:
Description:
Filebrowse button)

is there a way of doing this?
__________________

Please login or register to view this content. Registration is FREE
: a freelance webdesign service blog!

Last edited by Halbarad; 09-05-2005 at 03:32 PM..
Halbarad is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 09-05-2005, 04:36 PM
Skilled Talker

Posts: 83
Trades: 0
Olate Download is very good, you have to accept the files before they are placed on the site.

Last edited by ~CP~; 09-05-2005 at 04:37 PM.. Reason: typos :x
~CP~ is offline
Reply With Quote
View Public Profile
 
Old 09-05-2005, 05:12 PM
Experienced Talker

Posts: 49
Trades: 0
well, i was more looking for a system which has to be able to be integrated in my website.

Halbarad
__________________

Please login or register to view this content. Registration is FREE
: a freelance webdesign service blog!
Halbarad is offline
Reply With Quote
View Public Profile
 
Old 09-05-2005, 07:23 PM
Skilled Talker

Posts: 62
Trades: 0
The catalog/includes/classes/upload.php class from OSCommerce is a very simple, handy, and versatile class for managing file uploads - it simply manages file uploads, so it is easy to integrate into an existing site.

Code for managing a file upload:

Code:
	require_once(DIR_WS_CLASSES . 'upload.php');

	foreach($_FILES as $key=>$value) {

	$photos_upload = new upload($key);
	$photos_upload->set_destination(DIR_WS_UPLOADS . $photo_size);

	if ( ($_FILES[$key]['name'] != '') ) {
		if ($photos_upload->parse() && $photos_upload->save()) {
			$success .= '<p><b>' . $photos_upload->filename . '</b> uploaded successfully.</p>';
		} else {
			$error .= '<p>Error uploading <b>' . $photos_upload->filename . '</b> to ' . DIR_WS_UPLOADS . '</p>';
		}
	}
(Where your DIR_WS_CLASSES constant is defined as the directory upload.php appears in and DIR_WS_UPLOADS is defined as the path of your upload directory with appropriate permissions set)

I use the $success and $error variables to echo messages back to the user, but there is obviously a lot which may be done.

If you're going to use it, be sure to use protect your uploads directory for direct PUT requests with an .HTACCESS directive, and preserve the OSCommerce copyright information included with the script.
__________________

Please login or register to view this content. Registration is FREE
danlefree is offline
Reply With Quote
View Public Profile Visit danlefree's homepage!
 
Old 09-06-2005, 03:07 PM
Experienced Talker

Posts: 49
Trades: 0
thanks, this looks very interesting
__________________

Please login or register to view this content. Registration is FREE
: a freelance webdesign service blog!
Halbarad is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to script needed
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.15046 seconds with 12 queries