View Profile Personal Message (Online)
Send photo a PHP script
« on: Today at 04:40:44 PM » Reply with quote Modify message Remove message
Hello,
I am developing a midlet that goes off a photo and it sends her/it to a script php.
How can I send the photo?
I have tried to send the photo in an array byte...i write the code
conn = (HttpConnection) Connector.open(url);
conn.setRequestMethod(HttpConnection.POST);
conn.setRequestProperty("Content-Type",getRequestContentType());
conn.setRequestProperty("Accept","text/xml,text/html");
OutputStream os = conn.openOutputStream();
byte[] data = ("email="+login).getBytes();
os.write(data);
data = ("&password="+password).getBytes();
os.write(data);
photodata = videoCamera.getPhotoData();
data = ("&foto=").getBytes();
data = photodata;
os.write(data);
os.flush();
Is it right
Help me.....

Reply With Quote


