anyone know where i can learn to make a file upload section on my site???
i can use all the help i can get...
thanx
anyone know where i can learn to make a file upload section on my site???
i can use all the help i can get...
thanx
At 7/2/01 12:32 AM, ButtheadMoto wrote: anyone know where i can learn to make a file upload section on my site???
i can use all the help i can get...
thanx
What resources you got? PHP? ASP? both?
At 7/2/01 04:03 AM, RichL wrote:At 7/2/01 12:32 AM, ButtheadMoto wrote: anyone know where i can learn to make a file upload section on my site???What resources you got? PHP? ASP? both?
i can use all the help i can get...
thanx
PHP
At 7/2/01 04:25 PM, ButtheadMoto wrote:At 7/2/01 04:03 AM, RichL wrote:PHPAt 7/2/01 12:32 AM, ButtheadMoto wrote: anyone know where i can learn to make a file upload section on my site???What resources you got? PHP? ASP? both?
i can use all the help i can get...
thanx
Great! check out http://www.hotscripts.com/Detailed/5701.html
Its a pre-made binary upload script..which would be easier to customise than to create yourself. ;)
At 7/2/01 05:13 PM, RichL wrote: ..which would be easier to customise than to create yourself. ;)
Incorrect - as with all pre-written scripts, if you don't understand the syntax, you won't know what to correct when it goes wrong. Try looking at this tutorial for the very basics. There's a feature on the PHP site (which you can easily find by doing a quick search - "file upload" should do it).
At 7/2/01 06:57 PM, liljim wrote:At 7/2/01 05:13 PM, RichL wrote: ..which would be easier to customise than to create yourself. ;)Incorrect - as with all pre-written scripts, if you don't understand the syntax, you won't know what to correct when it goes wrong. Try looking at this tutorial for the very basics. There's a feature on the PHP site (which you can easily find by doing a quick search - "file upload" should do it).
thanx, i'll check those out...
At 7/2/01 05:13 PM, RichL wrote: Its a pre-made binary upload script..which would be easier to customise than to create yourself. ;)
And PHP CGI scripts are not binaries.
Its a pre-made binary upload script..which would be easier to customise than to create yourself. ;)And PHP CGI scripts are not binaries.
Take a look at the detailed page on the HotScripts link above. See the words "upload" and "in" and "B I N A R Y"? I was just looking for a script for him- this is what i found. (and the actual scripts arent binaries..i didnt say that. I said the scripts can upload in binary)
At 7/3/01 12:31 PM, RichL wrote:Take a look at the detailed page on the HotScripts link above. See the words "upload" and "in" and "B I N A R Y"? I was just looking for a script for him- this is what i found. (and the actual scripts arent binaries..i didnt say that. I said the scripts can upload in binary)Its a pre-made binary upload script..which would be easier to customise than to create yourself. ;)And PHP CGI scripts are not binaries.
Look.. there is no such thing as a PHP CGI binary, you do NOT compile PHP code unless you're making a module. Just do not post here, seeing as you are a complete moron because you don't know what you're talking about yet you spit out random shit. Just go back to the General section of the BBS!
At 7/3/01 02:17 PM, MassiveBit wrote: Look.. there is no such thing as a PHP CGI binary, you do NOT compile PHP code unless you're making a module. Just do not post here, seeing as you are a complete moron because you don't know what you're talking about yet you spit out random shit. Just go back to the General section of the BBS!
Actually Rich knows what he's talking about here for once. When he said binary he was referring to the types of files that the script can upload not the script itself. Quote from description on HotScripts:
"This is a PHP script that allows you to store any binary to MySQL. You can put any images, zip, exe or whatever binary format into MySQL."
Actually Rich knows what he's talking about here for once. When he said binary he was referring to the types of files that the script can upload not the script itself. Quote from description on HotScripts:
"This is a PHP script that allows you to store any binary to MySQL. You can put any images, zip, exe or whatever binary format into MySQL."
Thankyou. -about here for once- I think! I did say that..and i quote from my post before ". (and the actual scripts arent binaries..i didnt say that. I said the scripts can upload in binary)
". And MassiveB- dude, i was reading some other posts in this forum where you've replied to them- and in alot of them you swear, curse, and give decent people aload of shit. brighten up huh?
At 7/3/01 02:48 PM, aladinsane wrote: Actually Rich knows what he's talking about here for once. When he said binary he was referring to the types of files that the script can upload not the script itself. Quote from description on HotScripts:
"This is a PHP script that allows you to store any binary to MySQL. You can put any images, zip, exe or whatever binary format into MySQL."
That might have been what he meant, but not what he wrote (which was "Its a pre-made binary upload script") - probably why MassiveBit commented on it.
Annnnywayyyy, one thing I would recommend to those who're wanting to create file upload scripts - create a generic set of functions in a file that you can include() (or require()) and invoke through the scripts you are using.
At 7/3/01 03:05 PM, RichL wrote:Actually Rich knows what he's talking about here for once. When he said binary he was referring to the types of files that the script can upload not the script itself. Quote from description on HotScripts:Thankyou. -about here for once- I think! I did say that..and i quote from my post before ". (and the actual scripts arent binaries..i didnt say that. I said the scripts can upload in binary)
"This is a PHP script that allows you to store any binary to MySQL. You can put any images, zip, exe or whatever binary format into MySQL."
". And MassiveB- dude, i was reading some other posts in this forum where you've replied to them- and in alot of them you swear, curse, and give decent people aload of shit. brighten up huh?
Yeah, the problem I had was with these comments:
"I said the scripts can upload in binary"
"Its a pre-made binary upload script"
Those statements to me meant that the scripts themselves were binaries, which they obviously aren't. So it was due to your lack of clarity of these descriptions that I said what I said.
Don't get mad, mister... I might curse a lot, but not nearly as much as a typical American. ;o)
Yeah, the problem I had was with these comments:
"I said the scripts can upload in binary"
"Its a pre-made binary upload script"
Those statements to me meant that the scripts themselves were binaries, which they obviously aren't. So it was due to your lack of clarity of these descriptions that I said what I said.
Don't get mad, mister... I might curse a lot, but not nearly as much as a typical American. ;o)
Oh ok- i apoligise for this, i didnt think i wrote that (as its not what i meant). I was just trying to help the guy who asked the question! i wanna be a first class programmer like you guys. group hug ;)
At 7/4/01 06:13 AM, RichL wrote: Oh ok- i apoligise for this, i didnt think i wrote that (as its not what i meant). I was just trying to help the guy who asked the question! i wanna be a first class programmer like you guys. group hug ;)
Aww gosh darn.. you sweet bastard!
i can't get any scripts 2 work right. they all fail about half-way through.
At 7/7/01 02:21 PM, ButtheadMoto wrote:
i can't get any scripts 2 work right. they all fail about half-way through.
1/. Post your code.
2/. Post a url.
:)
At 7/7/01 02:25 PM, liljim wrote:At 7/7/01 02:21 PM, ButtheadMoto wrote:1/. Post your code.
i can't get any scripts 2 work right. they all fail about half-way through.
2/. Post a url.
)
it wont let me post the code...
how do i do it?
At 7/9/01 06:01 PM, ButtheadMoto wrote: it wont let me post the code...
how do i do it?
If you can't post it, then zip it up and link it.... That way we can look at the source code exactly as you've written it. Don't forget to hide any username / passwords in what you zip though.
At 7/9/01 06:16 PM, liljim wrote:At 7/9/01 06:01 PM, ButtheadMoto wrote: it wont let me post the code...If you can't post it, then zip it up and link it.... That way we can look at the source code exactly as you've written it. Don't forget to hide any username / passwords in what you zip though.
how do i do it?
the zip file is in this directory...
it include the source in .txt files & the actual .php files
At 7/9/01 08:00 PM, ButtheadMoto wrote:At 7/9/01 06:16 PM, liljim wrote:At 7/9/01 06:01 PM, ButtheadMoto wrote: it wont let me post the code...If you can't post it, then zip it up and link it.... That way we can look at the source code exactly as you've written it. Don't forget to hide any username / passwords in what you zip though.
how do i do it?
the zip file is in this directory...
it include the source in .txt files & the actual .php files
the zip file isn't on my "actual site"...
it is just in my mainly file storage site...
just so you don't think the code is for angelfire, angelfire sucks when it comes to CGI, PHP, etc.
OK, well firstly, you shouldn't have to specify a temp directory to upload to... The server should do that. Your script can be as simple as this (your function, re-written, together with another function that generates a new filename based on a timestamp).
function NewFileName($userfile_name) {
$newfile = time() . $userfile_name;
return $newfile;
}
function do_upload($userfile, $userfile_name, $userfile_size, $userfile_type) {
$new_file_name = NewFileName($userfile_name);
if (!@copy($userfile, "/path/to/desired/directory/" . $new_file_name)) {
return false;
} else {
return true;
}
}
Call it by using:
if (!do_upload($userfile, $userfile_name, $userfile_size, $userfile_type)) {
echo "Error uploading " . $userfile_name;
}
Of course, this doesn't specify what types of files you want, nor does it specify the max file size and ignore files that don't meet the criteria you want (though neither did your original script), but one thing at a time ;)