I think the way to debug this is to check what AJAX call is being made by
JSmol. Presumably you have adjusted Info.serverURL to point to your own
script, so you should be able to do the conversion there. The PHP in
jsmol.php is simply this:
if ($encoding == "base64") {
$output = ";base64,".base64_encode($output);
}
Note that we prepend ";base64," to the returned string so that JSmol knows
that we have done the conversion. $encoding is coming from:
$encoding = getValueSimple($values, "encoding", "");
In the case of a binary file, Jmol is resorting to getRawDataFromServer:
if (cantDoSynchronousLoad || asBase64 || !isMyHost && !isDirectCall)
return Jmol._getRawDataFromServer("_",fileName, null, null,
asBase64, true);
which means you will get a call to your PHP script that will looks like
this:
xxxxx.php?query=_&encoding=base64&file=http:%3A%2F%2F.....etc.
------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users