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
Creating a more complicated upload feature
Old 06-05-2011, 06:45 PM Creating a more complicated upload feature
Junior Talker

Posts: 4
Trades: 0
Hi all and thanks for helping!

Basically(lol) what I'm trying to do is create an "upload files" feature on a page on my new site. I have managed to copy/paste the readily available code you can find everywhere for a single file upload, but I need to make it a bit more specific and safe.. Here's what I need help with.

I need to be able to add an upload feature, that can accept multiple files of a certain type, BUT, I need to be able to limit the quantity depending on how they get to the page.. i.e. after they have made a payment in paypal, they will be taken to a landing page to upload their images. I have no issues creating many different landing pages, so I only need the maximum allowed files for that particular page(with the ability to change that maximum amount for different pages).

Also, I need to be able to adjust the minimum file size AND maximum file size which will be between 0.5mb and 20mb for example.

Next, I need those uploaded files to be able to save on the server in different folders that don't exist if that makes sense, for example:
/uploads/06JAN11 - Mr D Davies - xyz@xyz.co.uk(email address)
/uploads/06JAN11 - Mrs J Johnson - xyz@xyz.com
/uploads/08JAN11 - Ms G Goliath - xyz@xyz.com

etc etc

Ok, this is asking quite a lot so far, there is more.. But it is my first website, and I have made EVERYTHING from scratch, not knowing a thing, apart from these few things...

Ok, I also need help with making sure the landing page to upload the files are unavailable to anyone after they have paid to paypal, i.e. the old paypal hack of typing the "payment successful" page address and getting the item for free... so for example no one can type
www.mysite.com/paymentaccepted/uploadphotos
and get a free service lol...

Finally! at long last I hear you say, I need to be able to send a link to their email address, so they can directly download the files they have sent to me, from probably the same folder they uploaded them to in the first place....

I know this is probably asking a lot, but I'm a fulltime carer looking for my break, I can't afford anything in terms of money, but I can pay with time, for example if you have any mundane tasks need doing, or any help yourselves, I have no problems in returning the favour.. If you're happy helping out of the goodness of your heart, then its much appreciated too

Yhanks for reading, and any more info you need, please feel free to ask. I have Skype/msn etc etc if you need to go through some things in real time. I'm not stupid or anything lol, but this is my first site, and considering I have made the WHOLE site with Dreamweaver, Fireworks and Flash without knowing a thing 2 months ago, I think I have done well lol! It's just this one VERY important feature I have arrived at, and havent a clue where to start...

Thanks again
T1M3L355
T1M3L355 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 06-05-2011, 07:53 PM Re: Creating a more complicated upload feature
mgraphic's Avatar
Truth Seeker

Latest Blog Post:
JAMISONTUNES
Posts: 2,918
Name: Keith Marshall
Location: Connecticut
Trades: 0
If you are looking for help with a particular subject, please post the php you have and ask for help from there
__________________

<mgraphic /> - I don't have a solution but I admire the problem.
mgraphic is offline
Reply With Quote
View Public Profile
 
Old 06-07-2011, 12:24 AM Re: Creating a more complicated upload feature
Junior Talker

Posts: 4
Trades: 0
Thanks for the response, I was half expecting "Oh no a new guy come to troll and get something for nothing.." lol

Well basically, I have been trying these type of tutorials

tizag.com/phpT/fileupload.php
php.about.com/od/advancedphp/ss/php_file_upload.htm

etc etc, there are millions of the basic upload file features.. I have even tried "Gallery2 and 3" and other ones already available BUT in my "newness" I chose a bad one, it wiped EVERYTHIN I had created and had to start again from scratch ("oh dear" was some of the bad english that was used) but, its taken 1/10th of the time to complete it all this time!

it would just be nice to find a way of doctoring the normal code to add some specific features.. I havent a clue at all about scripting, I know how to recognise functions and change them a little, but thats about as far as my knowledge goes...

the only code I can provide is what is in those tutorials... sorry I can't help anymore... the thing is, I know what I want, but just have no idea on how to get it... And after trying a script that looked promising, and it deciding to delte my site, I'm a little less trusting now.. although i do have 3 backups of the site now lol...
T1M3L355 is offline
Reply With Quote
View Public Profile
 
Old 06-09-2011, 05:05 PM Re: Creating a more complicated upload feature
Super Spam Talker

Posts: 880
Name: Paul W
Trades: 0
http://php.net/manual/en/features.fi...d.multiple.php will be of interest.

Number of files etc - set those in a config file and include it in the php that presents and processes the form.

Don't make the newbie mistake of trying to solve everything at once. Work from the highest level to design the code and get more specific as and when appropriate.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE


*** New:
Please login or register to view this content. Registration is FREE
PaulW is online now
Reply With Quote
View Public Profile
 
Old 06-09-2011, 08:03 PM Re: Creating a more complicated upload feature
Junior Talker

Posts: 4
Trades: 0
Thanks PaulW

I have tried to tackle it one step at a time now, makes sense really, I did think that maybe there would have been something like what I am after already, guess not!

I have turned to this:
code.google.com/p/swfupload/

Seems the closest I am going to get, it covers setting the file sizes and limits (which I am trying to figure out how to do, still havent figured out how to implement anything and get it working yet though, but that seems the simplest in terms of the amount of files to figure out so far).

I am going to see if I can get that Instant Payment Notification thingy set up from PayPal, so that covers the security of stopping just anyone uploading anything. its just the folder names now, I have placed text boxes that provide todays date automatically, and a few others for their name etc... I think I have found the bit to change to set the folder name, but yet to figure out how to use the text boxes for a new folder.. i.e.

$_FILENAME = sendkeys.send(textbox1.text) + sendkeys.send(textbox2.text) + etc etc

p.s. that code is just a complete guess lol.. and i know its not real code :P

But, I am getting there slowly, very slowly lol... Would be great if someone knew what to do, and could say do xyz, and I would know what to do then in 30 minutes instead of 3 weeks.. everything I google gives me loads of functions and technical talk, and I just have no clue what any of it means.. It's like someone trying to tell you how to fly a helicopter in african and you don't know how to speak african... scary stuff, just means its a crash course, not a nice gentle one...

coding is exciting... just wish I knew how now
T1M3L355 is offline
Reply With Quote
View Public Profile
 
Old 06-10-2011, 08:44 AM Re: Creating a more complicated upload feature
mgraphic's Avatar
Truth Seeker

Latest Blog Post:
JAMISONTUNES
Posts: 2,918
Name: Keith Marshall
Location: Connecticut
Trades: 0
Quote:
Originally Posted by T1M3L355 View Post
...It's like someone trying to tell you how to fly a helicopter in african and you don't know how to speak african... scary stuff, just means its a crash course...
Crash course - literally!

I have worked with Paypal's encrypted website payment and IPN before. I may be of help later.
__________________

<mgraphic /> - I don't have a solution but I admire the problem.
mgraphic is offline
Reply With Quote
View Public Profile
 
Old 06-15-2011, 02:45 AM Re: Creating a more complicated upload feature
Junior Talker

Posts: 4
Trades: 0
That would be excellent thankyou!

I think I have solved the naming issue, but it is using AS3.. Just have to get "creative" with its implementation lol.. i.e.

apparently you can play files using a modifier similar to this:

myFileName++= +1
/this/is/a/folder/location/apicture"+myFileName+".jpg

So I am guessing (or kinda hoping) that if I did something like:

myFolderName++= ("textBox1.Text "+"textBox2.Text "+"textBox3.Text ")
myPictureName++= ("textBox4.Text "+"textBox2.Text ")

/this/is/a/folder/location/"+myFolderName+"/"+MyPictureName+"apicture.jpg

Still.. its a slow and steep learning curve! The logic is great! love that, its definitely me ... BUT, getting there slowly lol :P

After reading into IPN from PayPal, it seems to be PHP based mainly... So from a guess, you have to write it to "activate" the "Upload" button... For example:

person pays>
PayPal sends a code to my site>
they choose their files>
they click "Upload" or whatever>
that then sends their specific code to PayPal>
PayPal then returns either "VALIDATED" or "?cant remember?">
which in turn either says yes or no>
files upload or they dont>
happy customer/sad freebie hunter.



EDIT: maybe not the upload button... maybe the "browse for files" button......makes more sense and saves bandwidth and them wasting their time lol

Last edited by T1M3L355; 06-15-2011 at 02:52 AM..
T1M3L355 is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Creating a more complicated upload feature
 

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.58104 seconds with 12 queries