Passing a long string between Java and PHP? -



Passing a long string between Java and PHP? -

i have method takes long string, 90,860 characters , passes php page inserted database. i've read there isn't limit on size of php post upto 8mb. i'm assuming length of string should ok.

msg = urlencoder.encode(stringtoencode.tostring(),"utf-8"); defaulthttpclient httpclient = new defaulthttpclient(); httppost httppost = new httppost("http://mysite.com/insert.php?data="+msg); httpresponse response1 = httpclient.execute(httppost);

i know works can insert short plain strings.

on php page post info like:

$data = $_get['data'];

and insert it. need add together php de-code post message? read should done automatically php.

the problem long string either 500 error or if take string , set in browser page not available.

thanks in advance!

in java programme should not pass data, when long, in url, see this question illustration code how pass post parameters

from php side, should utilize $data = $_post['data'];

java php http

Comments

Popular posts from this blog

web services - java.lang.NoClassDefFoundError: Could not initialize class net.sf.cglib.proxy.Enhancer -

Accessing MATLAB's unicode strings from C -

javascript - mongodb won't find my schema method in nested container -