how to check if the picture already output IN PHP?

Discussion in 'PHP' started by KennyTE, Jul 7, 2007.

  1. #1
    Hi everyone,

    Let say, i have a page that output this a several image, how to check weather a certain image already successfully load to user browser?

    example image:

    <div><img src='http://www.nasa.gov/images/content/84857main_EC04-0325-23_lg.jpg' width='336' height='280'></div>

    i need to return a value if the picture finish load.

    Thanks.
     
    KennyTE, Jul 7, 2007 IP
  2. ansi

    ansi Well-Known Member

    Messages:
    1,483
    Likes Received:
    65
    Best Answers:
    0
    Trophy Points:
    100
    #2
    no real way to tell with php being as it is a server side language. though you could use some sory of javascript and onload() event. <img src="image.jpg" onload="do_something(); return false;" />
     
    ansi, Jul 7, 2007 IP
  3. KennyTE

    KennyTE Peon

    Messages:
    6
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    if that is the case that only javascript can perform this task, the how can i do it .......as onload, run php function? or onload, run SRC php file?
     
    KennyTE, Jul 7, 2007 IP