detect flv in PHP uploaded file

Discussion in 'PHP' started by phantom, Mar 29, 2011.

  1. #1
    Is there a way to detect if an uploaded file is of type .flv using PHP getimagesize ?


    I have looked but can not find any info.
    thanks in advance.
     
    phantom, Mar 29, 2011 IP
  2. Sky AK47

    Sky AK47 Member

    Messages:
    298
    Likes Received:
    8
    Best Answers:
    1
    Trophy Points:
    45
    #2
    Sky AK47, Mar 29, 2011 IP
  3. Muggles

    Muggles Peon

    Messages:
    13
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    From the PHP manual it is apparent there is no direct support for flv formats using the getimagesize() function. As already mentioned there are classes and extensions which deal with these types of formats. I can also suggest looking at the mime type in the $_FILES array when uploading though, this may pose a security risk as the header can be easily manipulated client side.
     
    Muggles, Mar 29, 2011 IP