Success :)))))))))))))
I've managed to write to my database with tens of thousands of characters. I had problems connecting because I was using http:// in the domain name, but when i removed it the code worked and I was able to talk to my script.
MQL (C language)
string myData = "testdata=abc123etc...";
string header = "Content-Type: application/x-www-form-urlencoded";
int open = InternetOpen("HTTP_Client_Sample", 0, "", "", 0);
int connect = InternetConnect(open, "website.com", 80, "", "", 3, 0, 1);
int request = HttpOpenRequest(connect, "POST", "/PHP/insert.php", NULL, NULL, acceptTypes, 0, 1);
HttpSendRequest(request, header, StringLen(header), myData , StringLen(myData));
PHP
Notice how i'm now able to use $_POST method which has a limitation of:
suhosin.post.max_value_length 1000000
More than enough for my needs. Before, my PHP script used $_GET which can only read 512 chars.
include("connect.php"); //Connect to the database
$data = $_POST['testdata'];
$result = mysql_query("INSERT INTO test (testdata) VALUES ('$data')");
if ($result) echo $data;
else echo "Error ".$mysqli->error;
mysql_close();
Thank you for everyone's help, it's greatly appreciated :)