making ggbBase64 yourselves
Form previous releases I have many geogebra files wich I included into my website using the filename parameter.
In the new release 4.4.10 I did an upload of one of my projects and obtained a html file to be used offline. I tried
to replace the ggbBase64 parameter with the filename parameter, but that does not seem to work.
e.g.
"ggbBase64":"...etc..."
by
"filename":"arbeid.ggb",
The file being placed at the same location as the html file.
What I am now looking for is php code to encrypt the arbeid.ggb file to the ggbBase64 code.
Any one who can help me out?
It is just a lot of work uploading all my previous work to the community. Now I am still working with older versions of Geogebra, but since
Ipads are not consuming my nice pieces of work, I want to make use of the wonderful new feature HTML5 you guys developed.
Thanks for all the nice work you all have done so far.
John
Hi,
try Ctrl + Shift + B in GeoGebra to copy the current file as ggbBase64 string to clipboard. Or use some file -> base64 converter with the .ggb file, eg. http://www.opinionatedgeek....
Cheers,
Zbynek
Dear Zbynek
Thanks for your quick response.
I did some research and found the following working:
$filename="someggb.ggb";
$ggbBase64="";
$fp=fopen($filename,"r");
if($fp)
{
$ggbBase64= base64_encode(fread($handle, filesize($filename)) );
}
The value of $ggbBase64 can now be set as the value for the parameter ggbBase64
"ggbBase64":"$ggbBase64"
Cheers,
John
Sorry one little mistake
if($fp)
{
$ggbBase64= base64_encode(fread($fp, filesize($filename)) );
}
Comments have been locked on this page!