This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2011-09-16 17:47:22

wulfmaster
Scratcher
Registered: 2011-04-23
Posts: 500+

(Proficient PHP) File uploader (Help)

So, I have the basics.  It will upload the file, and give them an address to use.  However, I want to add these features in:

~ A 'list' page.  On this page, you would find the files that you've uploaded.  I would assume this uses either cookies or IP sensing?

~ Auto-miniaturize URLs, these URLs would be like tiny.cc links, and be supplied to you, as well as the base address

These are the two main things currently.


Social Connections - Bringing communities close together! http://cyberkidscountry.com/ip.php

Offline

 

#2 2011-09-16 17:59:01

rookwood101
Scratcher
Registered: 2011-07-29
Posts: 500+

Re: (Proficient PHP) File uploader (Help)

1. For the list page, you will need a mysql database, that stores ips and the files they've uploaded.

2. For the auto miniaturize, read this


http://i.imgur.com/zeIZW.png

Offline

 

#3 2011-09-16 18:04:19

Baderous
New Scratcher
Registered: 2011-04-14
Posts: 100+

Re: (Proficient PHP) File uploader (Help)

You can't use cookies or IP sensing for the first task, that would only work if the user requested the "list" page in the same session or in the same network that he did the upload. You have to associate the files with the user that uploaded them, in the database.

For the second task, you have to search for some url-shortening service that you can use. I never used one of those for creating a feature of a webpage, but there should be some that provide some type of web-service that you can use. You'd send the base address and the service responds with the url-shortened version.

Offline

 

#4 2011-09-16 20:38:18

nathanprocks
Scratcher
Registered: 2011-04-14
Posts: 1000+

Re: (Proficient PHP) File uploader (Help)

i don't think IP sensing would work with dynamic IP addresses


http://carrot.cassiedragonandfriends.org/Scratch_Signature/randomsig.php
http://trinary.site40.net/images/scratchrank.php?username=nathanprocks&display=small

Offline

 

#5 2011-09-17 02:41:50

wulfmaster
Scratcher
Registered: 2011-04-23
Posts: 500+

Re: (Proficient PHP) File uploader (Help)

nathanprocks wrote:

i don't think IP sensing would work with dynamic IP addresses

Yeah, I realised.  Currently, I'm thinking about user registration, but that still leaves the problem of dynamic IP's. As I only want 1 account per IP, this would totally leave me devestated,.  However, I believe having to use emails would help prevent this problem, but still not totally fix it.  If you have any other ideas, please tell me.  Could it be that people have to download a plugin for their browser to signup to the service?   However, downloading wouldn't bother me to much, it's the uploading which I want to monitor.  It would be 1gb per acount, and as it's 1 account per IP, email, and plugin (possibly), I believe this would prevent any future problems?  If not, can you please tell me how I can prevent multiple accounts for 1 person?


Social Connections - Bringing communities close together! http://cyberkidscountry.com/ip.php

Offline

 

#6 2011-09-17 04:50:44

Paddle2See
Scratch Team
Registered: 2007-10-27
Posts: 1000+

Re: (Proficient PHP) File uploader (Help)

Closed by request of the topic owner.


http://i39.tinypic.com/2nav6o7.gif

Offline

 

Board footer