php - How can I pass a very long string from one page to another? -
i'm making data visualisation tool works using svg, d3.js , jquery. making feature export (and download) svg file:
// code on main page var svg = $("#svg-wrap").html(); var win = window.open("export.php?svg=" + svg, '_blank'); // _blank means export.php opens in new tab win.focus; // code in export.php <?php ob_start(); header("content-type: application/octet-stream"); header("content-disposition: attachment; filename=data.svg"); $svg = $_get["svg"]; echo stripslashes($svg); ?>
this doesn't work though, because although of svg passed through, full code long query string (or seems).
is there way can fix this? use compression, shrink limit , think still long - svg code hundreds of lines :( .
most uas put limits on requests. use post instead.
Comments
Post a Comment