I’m looking to make a flash file uploader, using PHP, but I dont know where to start! I’m not too expirienced in flash, and need to get this done now, anybody have any ideas?
start with getting a file to upload from an html form.
<html>
<head>
<title>Uploading File....</title>
</head>
<body>
<h1>Uploading File....</h1>
<?
if ($user_file=="none"){
echo "Problem: no file uploaded";
exit;
}
if ($userfile_size==0){
echo "Problem: uploaded file file is zero length";
exit;
}
if ($userfile_type != "text/plain"){
echo "Problem: file is not plain text";
exit;
}
if (!is_uploaded_file($userfile)){
echo "Problem: possible file upload attack";
exit;
}
$upfile = "/home/digitalo/public_html/exp/fileUpload/".$userfile_name;
if ( !copy($userfile, $upfile)){
echo "Problem: Could not move file into dirctory";
exit;
}
echo "File uplaoded successfully<br><br>";
$fp = fopen($upfile, "r");
$contents - fread ($fp, filesize ($upfile));
fclose ($fp);
?>
</body>
</html>
havent tried it in flash yet, but that should get you started
oh and here’s the html
<html>
<head>
<title>Upload File</title>
</head>
<body>
<h1>Uplaod New Files</h1>
<form enctype="multipart/form-data" action="upload.php" method=post>
<input type="hidden" name="MAX_FILE_SIZE" value="1000">
Upload This File: <input type="file" name="userfile"><br>
<input type="Submit" value="Upload">
</form>
</body>
</html>
jubbrok have you ever tried this with Flash?