How to check image format?

Discussion in 'PHP' started by slaydragon, Jun 24, 2008.

  1. #1
    slaydragon, Jun 24, 2008 IP
  2. QiSoftware

    QiSoftware Well-Known Member

    Messages:
    805
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    158
    #2
    QiSoftware, Jun 24, 2008 IP
    slaydragon likes this.
  3. furnissg

    furnissg Peon

    Messages:
    61
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    function exif_imagetype will work

    or you can do a strstr on the extension, but that wont check if it is actually an image just that the file extension is correct
     
    furnissg, Jun 24, 2008 IP
    slaydragon likes this.
  4. slaydragon

    slaydragon Banned

    Messages:
    1,403
    Likes Received:
    24
    Best Answers:
    0
    Trophy Points:
    0
    #4
    thanks alot for the advice.. reps given..
     
    slaydragon, Jun 24, 2008 IP
  5. EricBruggema

    EricBruggema Well-Known Member

    Messages:
    1,740
    Likes Received:
    28
    Best Answers:
    13
    Trophy Points:
    175
    #5
    EricBruggema, Jun 24, 2008 IP