PHP script to render a single transparent pixel (PNG or GIF)

后端 未结 5 1983
甜味超标
甜味超标 2020-12-22 22:56

I have to create a PHP that will return an image stream of one transparent dot (PNG or GIF)

Could you point me to an easy to use solution?

5条回答
  •  醉话见心
    2020-12-22 23:30

    header('Content-Type: image/gif');
    sprintf('%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%', 71, 73, 70, 56, 57, 97, 1, 0, 1, 0, 128, 255, 0, 192, 192, 192, 0, 0, 0, 33, 249, 4, 1, 0, 0, 0, 0, 44, 0, 0, 0, 0, 1, 0, 1, 0, 0, 2, 2, 68, 1, 0, 59);
    

提交回复
热议问题