Strange and intermittent fOpen type error

Discussion in 'PHP' started by jakeylakey, Nov 30, 2006.

  1. #1
    Hey,

    I run a website which grabs gif images from another webserver at runtime with php functions such as copy and imagecreatefromgif with http as the path to the image.

    The vast majority of the time (95% of about 20k daily) it works fine. But I receive error messages such as the one below for the other 5%. It would suggest that the external web server is failing on some requests. What im wondering is what the strange collection of bytes at the end of the error message is, it is always different and different lengths. Why is it there?

    If anyone has any other hints and tips to grab images perhaps more reliably they will be very welcome. Thanks in advance.

    Here is some examples of the error messages. They do seem to happen in bursts close together.

    Error #: 2
    Error Text: copy(http://www.nationsprint.com/clients/goodprintcards/dat/box_US01015BC4normal.gif): failed to open stream: HTTP request failed! 4À-

    Error #: 2
    Error Text: copy(http://www.nationsprint.com/clients/goodprintcards/dat/textL4c_US7A40393Anormal.gif): failed to open stream: HTTP request failed! ,X0 ¿* Dš8
     
    jakeylakey, Nov 30, 2006 IP
  2. CodyRo

    CodyRo Peon

    Messages:
    365
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    #2
    It looks like the server is just failing.. does it happen around the same time consistently?

    Also the extra bytes.. could they be from the imagecreatefromgif() function and not the copy()? Possibly the imagecreatefrom() function is still trying to make a image out of the page it grabs, but since it's a timed out page it just spits out a few non-sense bytes.

    My two cents, sorry couldn't have been more of a help.
     
    CodyRo, Dec 1, 2006 IP