How to tell if Mime type matches contents

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Ed Eichman

    #1

    How to tell if Mime type matches contents

    Hi Everyone,

    Before I write the script myself, I'm looking for PHP code that checks
    that a link's content type matches it's contents. I need this for my
    "broken link" checker script, which fails to spot the "broken" links
    http://www.awin1.com/show.php?mid=10...6515&aid=49007 and
    http://www.awin1.com/awclick.php?mid...36515&id=49007. Any
    ideas?

    BTW, in case the links get fixed before you read the message, the first
    link is a GIF MIME that returns
    -----------------------
    The image
    "http://www.awin1.com/show.php?mid=10 14&linkid=36515 &aid=49007"
    cannot be displayed, because it contains errors.
    -----------------------

    The second is a text/html that returns
    -----------------------
    Warning: mysql_result(): Unable to jump to row 0 on MySQL result index
    30 in /home/sites/site3/web/awclick.php on line 51

    Warning: mysql_fetch_arr ay(): supplied argument is not a valid MySQL
    result resource in /home/sites/site3/web/linkdeliveryfun ctions.inc.php
    on line 178

    Warning: mysql_result(): supplied argument is not a valid MySQL result
    resource in /home/sites/site3/web/linkdeliveryfun ctions.inc.php on line
    478

    Warning: Cannot modify header information - headers already sent by
    (output started at /home/sites/site3/web/awclick.php:51) in
    /home/sites/site3/web/linkdeliveryfun ctions.inc.php on line 462

    Warning: Cannot modify header information - headers already sent by
    (output started at /home/sites/site3/web/awclick.php:51) in
    /home/sites/site3/web/awclick.php on line 235
    -------------------------------------------------------

    Thanks,
    Ed

  • Oli Filth

    #2
    Re: How to tell if Mime type matches contents

    Ed Eichman said the following on 29/12/2005 14:18:[color=blue]
    > Hi Everyone,
    >[/color]

    Yes, posting the same thing 4 times in 3 days is more likely to get you
    help.


    --
    Oli

    Comment

    • Ed Eichman

      #3
      Re: How to tell if Mime type matches contents

      Hi Oli,

      Thanks for the help. I kept posting, and it kept NOT showing up in
      google groups. I post to several other groups, and it always came up
      right away. Don't know why I didn't see it here. Today I finally see
      them all.

      Sorry for the bother, and Happy Holidays,
      Ed

      Comment

      • Oli Filth

        #4
        Re: How to tell if Mime type matches contents

        Ed Eichman said the following on 30/12/2005 09:00:[color=blue]
        > Hi Oli,
        >
        > Thanks for the help. I kept posting, and it kept NOT showing up in
        > google groups. I post to several other groups, and it always came up
        > right away. Don't know why I didn't see it here. Today I finally see
        > them all.
        >[/color]

        Ah, well in that case, my advice would be to use a proper newsreader (I
        recommend Thunderbird). Google Groups is *rubbish*.


        --
        Oli

        Comment

        Working...