Jump to content

[SOLVED] uploading .flv files


bruckerrlb

Recommended Posts

Hello,

 

I am trying to tweak an old script to upload videos, and I am wondering if anyone knows how I can check to make sure a flv file is something being uploaded. For example,  the swf I have

($_FILES["file"]["type"] == "application/x-shockwave-flash")

 

Yet not sure what I could use for flv.

 

Link to comment
Share on other sites

try to upload any file

<?php
echo '<pre>';
print_r($_FILES);
echo '</pre>';
?>
<html>
<body>

<form action="<? $_SERVER['PHP_SELF']?>" method="post" enctype="multipart/form-data">
<label for="file">Filename:</label>
<input type="file" name="file" id="file" /> 
<br />
<input type="submit" name="submit" value="Submit" />
</form>

</body>
</html>

Link to comment
Share on other sites

This is the code that it gave me

 

(
    [file] => Array
        (
            [name] => WIRELESS WORLD FULL_112K.flv
            [type] => application/octet-stream
            [tmp_name] => /tmp/phpNugkNo
            [error] => 0
            [size] => 207337
        )

)


 

When I first tried to do this, I spelt octet wrong, that's why it didnt' work!! Anyway, I was reading that using application/octet-stream isn't good to do because people can upload viruses to the server. Yet, since this is for just one person to use, and they have to be logged in to even see this page, I doubt they are going to want to comprimise their own server.

 

Thanks for the help!

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.