FRIHOSTFORUMSFAQTOSBLOGSDIRECTORY
You are invited to Log in or Register a Frihost Account!

Need Help Please (I offer all my frih$)

 


mtorregiani
I need a .cgi script for this

Code:
<HEAD>

<SCRIPT LANGUAGE="JavaScript">

<!-- Begin
extArray = new Array(".gif", ".jpg", ".png");
function LimitAttach(form, file) {
allowSubmit = false;
if (!file) return;
while (file.indexOf("\\") != -1)
file = file.slice(file.indexOf("\\") + 1);
ext = file.slice(file.indexOf(".")).toLowerCase();
for (var i = 0; i < extArray.length; i++) {
if (extArray[i] == ext) { allowSubmit = true; break; }
}
if (allowSubmit) form.submit();
else
alert("Please only upload files that end in types:  "
+ (extArray.join("  ")) + "\nPlease select a new "
+ "file to upload and submit again.");
}
//  End -->
</script>
</HEAD>

<BODY>

<center>
Please upload only images that end in: 
<script>
document.write(extArray.join("  "));
</script>
<p>

<form method=post name=upform action="/cgi-bin/some-script.cgi" enctype="multipart/form-data">
<input type=file name=uploadfile>
<p>
<input type=button name="Submit" value="Submit" onclick="LimitAttach(this.form, this.form.uploadfile.value)">
</form>
</center>

<p><center>
</body>


I offer all my frih$

I only want upload .avi, .mpg, .mpeg, and .wmv with a file size limit of 20mb
mattd8752
You should also make the cgi script check the types, it is quite easy to disable javascript...
mtorregiani
mattd8752 wrote:
You should also make the cgi script check the types, it is quite easy to disable javascript...


Yeah, can you do that for me?
Remember, all my frih$ Laughing
Mgccl
70$F for that?????
man, if I know CGI.... but I'm just beginner PHPer
mtorregiani
Mgccl wrote:
70$F for that?????
man, if I know CGI.... but I'm just beginner PHPer


So you will not? Rolling Eyes
n0obie4life
mtorregiani wrote:
I offer all my frih$

I only want upload .avi, .mpg, .mpeg, and .wmv with a file size limit of 20mb


Use it on Frihost and I wish you good luck someday Smile.

No, not because you allowed file uploading, because of the file extensions you are going to allow.
mattd8752
I will write a php script if you really want, but I can't do it right now, I am buisy, look for an image upload script and mod the extensions.
mtorregiani
Well, no one is going to help me .. so... Lock this thread
This topic is locked: you cannot edit posts or make replies.    Frihost Forum Index -> Miscellaneous -> Marketplace

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2007 Frihost, forums powered by phpBB.