How to save binary image to local

Discussion in 'PHP' started by wll6568, Nov 27, 2008.

  1. #1
    I have a file getimage.php which it takes in a url and then provides a screenshot of the website:

    header("Content-type: image/png");
    echo($image);

    which will print out an image if i reference it like this:

    <img src="getimage.php?url=xxx.xom" />


    Everything works fine, but I am thinking of saving this binary image locally. Is there a way to do that?
     
    wll6568, Nov 27, 2008 IP
  2. catapop

    catapop Peon

    Messages:
    79
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #2
    imagegif($png, './php.gif'); where $png is your image refference

    for more information see http://www.php.net/gd

    good luck
     
    catapop, Nov 27, 2008 IP
  3. EricBruggema

    EricBruggema Well-Known Member

    Messages:
    1,740
    Likes Received:
    28
    Best Answers:
    13
    Trophy Points:
    175
    #3
    EricBruggema, Nov 28, 2008 IP