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
Forum Sig Upload script Help!!!
Moderator: General Moderators
- AVATAr
- Forum Regular
- Posts: 524
- Joined: Tue Jul 16, 2002 4:19 pm
- Location: Uruguay -- Montevideo
- Contact:
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.
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.
-
kettle_drum
- DevNet Resident
- Posts: 1150
- Joined: Sun Jul 20, 2003 9:25 pm
- Location: West Yorkshire, England
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.
viewtopic.php?p=83978
Thats the url to it.
-
kettle_drum
- DevNet Resident
- Posts: 1150
- Joined: Sun Jul 20, 2003 9:25 pm
- Location: West Yorkshire, England