I would like to send a large JSON file ( > 110k characters) from javascript to php. I am willing to use any method that will work. I can get around 60k characters using xmlhttp transfer commands but anymore than that and the string is chopped off. Here is a small example of how I am currently performing the transfer:
xmlhttp.open("POST","my.php",true);
xmlhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");
xmlhttp.send("obj=" + (JSON.stringify(myObj)) + "&" + "name=" +document.getElementById("textBox1").value);
I have also tried but it makes the string longer which I wouldnt care about as long as it transferred all of the string:
xmlhttp.open("POST","my.php",true);
xmlhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");
xmlhttp.send("obj=" + encodeURIComponent((JSON.stringify(myObj))) + "&" + "name=" +document.getElementById("textBox1").value);