For file upload websites. Preferably in flash.
I've tried everything I can get my hands on and nothing will work.
Any links appreciated!

For file upload websites. Preferably in flash.
I've tried everything I can get my hands on and nothing will work.
Any links appreciated!
A 'thanks' or a 'please' would be nice, but hey!
Here's a simple php one...
PHP Code:<?php
$target = "upload/";
$target = $target . basename( $_FILES['uploaded']['name']) ;
$ok=1;
if ($uploaded_size > 350000)
{
echo "Your file is too large.<br>";
$ok=0;
}
if ($uploaded_type =="text/php")
{
echo "No PHP files<br>";
$ok=0;
}
if ($ok==0)
{
Echo "Sorry your file was not uploaded";
}
else
{
if(move_uploaded_file($_FILES['uploaded']['tmp_name'], $target))
{
echo "The file ". basename( $_FILES['uploadedfile']['name']). " has been uploaded";
}
else
{
echo "Sorry, there was a problem uploading your file.";
}
}
?>
i'm out of touch, i'm out of love
i'll pick you up when you're getting down
and out of all these things i've done
i think i love you better now
Thanks and appreciation are pretty much the same thing.
But thanks as well!
Also,
Is this the script to embed the upload, or the server php script?
And is the upload limit in Bytes or Kbs?
Edited by Xarea (Forum Moderator): Please do not double post - thanks.
Last edited by Xarea; 10-05-2009 at 09:53 PM.
In bytes. Its the processing part which will allow anyone to upload anything to your site.
Could be a bit neater, but I guess it does the job.
Hi, names James. I am a web developer.
And how safe is this?
If i disallow .exe files for upload will it be fine?
Can i use this script with a flash uploader embedded into the site?
Thanks
Yeah of course you will be fine, nothing can be more dangerous than a .exe file on your server!
If you want a flash uploader, you've got to see what class it uses to upload, say filereference like mine does, the data you'd grab be $_FILES[ 'filedata' ].
Hi, names James. I am a web developer.
Wheres the best place to find a basic flash uploader? The one'es i found came out on my site as a giant blue square
Want to hide these adverts? Register an account for free!