picture sent in http with base64

This is a discussion on picture sent in http with base64 within the alt.comp.lang.php forums, part of the PHP Programming Forums category; Hi, to provide visual confirmation for http://beztajemnic.evot.org/index.php?s=1 my server is sending data:image/...


Go Back   Usenet Forums > PHP Programming Forums > alt.comp.lang.php

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 12-03-2006
Zbigniew Lisiecki
 
Posts: n/a
Default picture sent in http with base64

Hi,
to provide visual confirmation for
http://beztajemnic.evot.org/index.php?s=1
my server is sending data:image/png;base64 in the http protocoll.
This allows to omit writting picture data on the disk,
actually this part of the disk is read only.

With my KDE/konqueror and Firefox under Linux I can see the
correct picture, but some clients don't see it.
How could I correct this error ?

thank you in advance
Zbyszek
--
http://zbyszek.evot.org
Reply With Quote
  #2 (permalink)  
Old 12-03-2006
Ric
 
Posts: n/a
Default Re: picture sent in http with base64

Zbigniew Lisiecki schrieb:
> Hi,
> to provide visual confirmation for
> http://beztajemnic.evot.org/index.php?s=1
> my server is sending data:image/png;base64 in the http protocoll.
> This allows to omit writting picture data on the disk,
> actually this part of the disk is read only.
>
> With my KDE/konqueror and Firefox under Linux I can see the
> correct picture, but some clients don't see it.
> How could I correct this error ?
>
> thank you in advance
> Zbyszek


First I would try to make sure the html is correct:-)

<img src="data:image/png;.... name="vconf.png"

is missing: ", after adding it I see "smover" :-)
Reply With Quote
  #3 (permalink)  
Old 12-03-2006
Zbigniew Lisiecki
 
Posts: n/a
Default Re: picture sent in http with base64

Ric wrote:

> Zbigniew Lisiecki schrieb:
>> Hi,
>> to provide visual confirmation for
>> http://beztajemnic.evot.org/index.php?s=1
>> my server is sending data:image/png;base64 in the http protocoll.
>> This allows to omit writting picture data on the disk,
>> actually this part of the disk is read only.
>>
>> With my KDE/konqueror and Firefox under Linux I can see the
>> correct picture, but some clients don't see it.
>> How could I correct this error ?
>>
>> thank you in advance
>> Zbyszek

>
> First I would try to make sure the html is correct:-)
>
> <img src="data:image/png;.... name="vconf.png"
>
> is missing: ", after adding it I see "smover" :-)


Yes Ric,
is my html correct now ?
z
--
http://zbyszek.evot.org
Reply With Quote
  #4 (permalink)  
Old 12-03-2006
Ric
 
Posts: n/a
Default Re: picture sent in http with base64

Zbigniew Lisiecki schrieb:
> Ric wrote:
>
>> Zbigniew Lisiecki schrieb:
>>> Hi,
>>> to provide visual confirmation for
>>> http://beztajemnic.evot.org/index.php?s=1
>>> my server is sending data:image/png;base64 in the http protocoll.
>>> This allows to omit writting picture data on the disk,
>>> actually this part of the disk is read only.
>>>
>>> With my KDE/konqueror and Firefox under Linux I can see the
>>> correct picture, but some clients don't see it.
>>> How could I correct this error ?
>>>
>>> thank you in advance
>>> Zbyszek

>> First I would try to make sure the html is correct:-)
>>
>> <img src="data:image/png;.... name="vconf.png"
>>
>> is missing: ", after adding it I see "smover" :-)

>
> Yes Ric,
> is my html correct now ?
> z


Well the image is there now, but you still got some errors:-)


If I open Firefoxs Error-Console I can see two messages, complaining
about a unknown property: boder-top
Should be: border-top
Reply With Quote
  #5 (permalink)  
Old 12-03-2006
Zbigniew Lisiecki
 
Posts: n/a
Default Re: picture sent in http with base64

Ric wrote:

> Zbigniew Lisiecki schrieb:
>> Ric wrote:
>>
>>> Zbigniew Lisiecki schrieb:
>>>> Hi,
>>>> to provide visual confirmation for
>>>> http://beztajemnic.evot.org/index.php?s=1
>>>> my server is sending data:image/png;base64 in the http protocoll.
>>>> This allows to omit writting picture data on the disk,
>>>> actually this part of the disk is read only.
>>>>
>>>> With my KDE/konqueror and Firefox under Linux I can see the
>>>> correct picture, but some clients don't see it.
>>>> How could I correct this error ?
>>>>
>>>> thank you in advance
>>>> Zbyszek
>>> First I would try to make sure the html is correct:-)
>>>
>>> <img src="data:image/png;.... name="vconf.png"
>>>
>>> is missing: ", after adding it I see "smover" :-)

>>
>> Yes Ric,
>> is my html correct now ?
>> z

>
> Well the image is there now, but you still got some errors:-)
>
>
> If I open Firefoxs Error-Console I can see two messages, complaining
> about a unknown property: boder-top
> Should be: border-top


yes, I'v corrected this.
I am happy the picture is there.
Do you think it can be seen in all browsers now ?
z
--
http://zbyszek.evot.org
Reply With Quote
  #6 (permalink)  
Old 12-03-2006
Michael Fesser
 
Posts: n/a
Default Re: picture sent in http with base64

..oO(Zbigniew Lisiecki)

>to provide visual confirmation for
>http://beztajemnic.evot.org/index.php?s=1
>my server is sending data:image/png;base64 in the http protocoll.
>This allows to omit writting picture data on the disk,
>actually this part of the disk is read only.
>
>With my KDE/konqueror and Firefox under Linux I can see the
>correct picture, but some clients don't see it.
>How could I correct this error ?


IE doesn't support data URLs.

Micha
Reply With Quote
  #7 (permalink)  
Old 12-04-2006
Zbigniew Lisiecki
 
Posts: n/a
Default Re: picture sent in http with base64

Michael Fesser wrote:

> .oO(Zbigniew Lisiecki)
>
>>to provide visual confirmation for
>>http://beztajemnic.evot.org/index.php?s=1
>>my server is sending data:image/png;base64 in the http protocoll.
>>This allows to omit writting picture data on the disk,
>>actually this part of the disk is read only.
>>
>>With my KDE/konqueror and Firefox under Linux I can see the
>>correct picture, but some clients don't see it.
>>How could I correct this error ?

>
> IE doesn't support data URLs.


It means you don't see the picture, do you ?
What is the correct solution on the read-only server fs then ?
z
--
http://zbyszek.evot.org
Reply With Quote
  #8 (permalink)  
Old 12-04-2006
Zbigniew Lisiecki
 
Posts: n/a
Default Re: picture sent in http with base64

Michael Fesser wrote:

> .oO(Zbigniew Lisiecki)
>
>>to provide visual confirmation for
>>http://beztajemnic.evot.org/index.php?s=1
>>my server is sending data:image/png;base64 in the http protocoll.
>>This allows to omit writting picture data on the disk,
>>actually this part of the disk is read only.
>>
>>With my KDE/konqueror and Firefox under Linux I can see the
>>correct picture, but some clients don't see it.
>>How could I correct this error ?

>
> IE doesn't support data URLs.


It means you don't see the picture, do you ?
What is the correct solution on the read-only server fs then ?

The way i do now is:

function gen_rand_img () {
...
ob_start (NULL, 4096);
imagepng($img);
imagedestroy($img);
return (base64_encode(ob_get_clean()));
}

$head="
<!doctype html public \"-//w3c//dtd html 4.0 transitional//EN\">
<html>
<head>
<title>...</title>
<meta http-equiv=\"Content-Type\" content=\"text/html;
charset=iso-8859-2\"
....";

echo $head;

header("Cache-Control: no-store, no-cache, must-revalidate"); //http/1.1
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache"); // HTTP/1.0

....

echo "
echo "<img src=\"data:image/png;base64,".gen_rand_img()."\"
name=\"vconf.png\">";


z
--
http://zbyszek.evot.org
Reply With Quote
  #9 (permalink)  
Old 12-04-2006
Zbigniew Lisiecki
 
Posts: n/a
Default Re: picture sent in http with base64

Michael Fesser wrote:

> .oO(Zbigniew Lisiecki)
>
>>to provide visual confirmation for
>>http://beztajemnic.evot.org/index.php?s=1
>>my server is sending data:image/png;base64 in the http protocoll.
>>This allows to omit writting picture data on the disk,
>>actually this part of the disk is read only.
>>
>>With my KDE/konqueror and Firefox under Linux I can see the
>>correct picture, but some clients don't see it.
>>How could I correct this error ?

>
> IE doesn't support data URLs.


It means you don't see the picture, do you ?
What is the correct solution on the read-only server fs then ?

The way i do it now is:

function gen_rand_img () {
...
ob_start (NULL, 4096);
imagepng($img);
imagedestroy($img);
return (base64_encode(ob_get_clean()));
}

$head="
<!doctype html public \"-//w3c//dtd html 4.0 transitional//EN\">
<html>
<head>
<meta http-equiv=\"Content-Type\" content=\"text/html;
charset=iso-8859-2\"
....";

echo $head;

header("Cache-Control: no-store, no-cache, must-revalidate"); //http/1.1
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache"); // HTTP/1.0

....

echo "<img src=\"data:image/png;base64,".gen_rand_img()."\"
name=\"vconf.png\">";


z
--
http://zbyszek.evot.org
Reply With Quote
  #10 (permalink)  
Old 12-04-2006
Zbigniew Lisiecki
 
Posts: n/a
Default Re: picture sent in http with base64

Zbigniew Lisiecki wrote:

> It means you don't see the picture, do you ?


sorry,
I corrected this for MSIE allowing to write png image to the filesystem.
To test the original problem now you have to change your brower
identification.

Now I hope everybody can see the picture.
z
--
http://zbyszek.evot.org
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 02:32 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0