• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Is it possible to directly in a txt file using HttpConnection without any servlet?

 
Olga Flasza
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to write some text from midlet to a .txt file one the server.

I have already a file on the server named a.txt

Here is the code segment..

I don't know if this is a stupid question...
However any help is greatly appreciated.
 
Gopinath Karyadath
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here you are sending a hello string to server for adding to a b.text file which is in the server.This is what I assumed.
For adding or editing in the text file which is in the server You have to write the procedure in the server side according to
your request in the mobile.
 
Olga Flasza
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, Thanks for the reply. your assumption is correct.

I have a very little experience on server side programming. Infact I am trying to upload an image on the server from MIDlet.

I am using PHP as server side language. I like to know that if it is possible to upload image using the POST method..

Can you please give me an example ?
 
Olga Flasza
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am sending images as byte Array (data[])
but not sure how to handle it in PHP..

From midlet I send through the stream as


Here is my PHP code...


On the midlet screen It prints error only..
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic