$pieces[0], "price_change"=>$pieces[1], "change"=>$pieces[2], "last_update"=>$pieces[3],"server_update"=>$pieces[4], "color"=>$pieces[5], "symbol"=>$pieces[6]); echo json_encode($marks, JSON_PRETTY_PRINT); } else { $txt = base64_decode($q); $pieces = explode("=", $txt); if(strcmp($pieces[7], $key) == 0) { $myfile = fopen("cache.txt", "w") or die("Unable to open file!"); fwrite($myfile, $txt); fclose($myfile); echo "Done!"; } else { echo "Key Invalid"; fclose($myfile); } } ?>