Page 1 of 1
Forum Sig Upload script Help!!!
Posted: Sun Jan 25, 2004 9:07 am
by ryan
Basicly i want to do this:
- Upload gif,jpg only
- Max file size 20k
- Max image dimensions 400 x 75 pixels (width x height)
- Allow each IP only one upload per day
- Display link to file for leaching after uploaded
- Error message if file size is greater than 20k and/or image dimesions greater than 400x75
I've tryed the tutorial at phpphreaks but i cant seem to get it working
Any help much appreciated
Posted: Sun Jan 25, 2004 9:26 am
by AVATAr
well ryan... you have many issues there!.
1- upload stuff.. first try making a form.
2- file size, read
http://www.php.net/manual/en/function.m ... d-file.php
http://www.php.net/manual/en/function.i ... d-file.php
3- IP stuff,.. you will have to store them in a DB (mysql.org)
4- displaying a link, very standard issue, search the forum. You have to read a directory of your server and echo them.
check here:
http://www.php.net/manual/en/function.readdir.php
http://www.php.net/manual/en/function.is-file.php
and try to do it yourself, and post here your questions.. we will help you.
Posted: Sun Jan 25, 2004 9:31 am
by ryan
Thanks for the reply dude
Posted: Sun Jan 25, 2004 9:34 am
by kettle_drum
You can use my file upload class i just submitted into the code snippet section of the site. It will do all what you want except limit the uploads per IP, but you can just add that feature on.
viewtopic.php?p=83978
Thats the url to it.
Posted: Sun Jan 25, 2004 9:40 am
by ryan
Thanxalot but i would rather try and do it myself(well with a tutorial) anyone know of a good upload form tutorial? soory but i'm a complete n00b

Posted: Sun Jan 25, 2004 9:46 am
by ryan
kettle_drum just looked at your class and i think it will actully help me learn PHP just as good as a tutorial
Thanx alot
Posted: Sun Jan 25, 2004 9:50 am
by kettle_drum
Yeah, just follow it through and figure out what everything does then try and have a go at replicating it all. Its pretty simple stuff once you gte your head round it.
Posted: Sun Jan 25, 2004 11:30 am
by AVATAr
Like kettle_drum said,.. the best "learning" practice.. is to analyze a script.. use it.. and then make your own.... cheers