raghavan_lax Posted May 31, 2007 Share Posted May 31, 2007 How can i recieve the file stream in php which is sent by the java swing program. and how can i test that the file has been updated. after uploading a file i have to process it in php code. can anybody please help me. here is the function where am sending file (in java) path=http://192.168.100.40/php_prgs/var/www/nsboxng/htdocs/tryupdate.php?&view=ids&dir=Default&file=test1.ids public void updateToServer(String path, File file){//ZipOutputStream zout){ //ZipOutputStream zout = null; if (!(path == null || path.equals(""))) { try { HttpURLConnection conn = create(path); //conn.setReadTimeout(300000); // 5 minutes ?? send(file, conn); }catch (Exception ex) { ex.printStackTrace(); } } } public void send(Object obj, HttpURLConnection conn) throws IOException { OutputStream out0; out0 = conn.getOutputStream(); ObjectOutputStream out = new ObjectOutputStream(out0); out.writeObject(obj); out.flush(); out.close(); } Link to comment https://forums.phpfreaks.com/topic/53694-how-can-i-recieve-the-file-stream-in-php-which-is-sent-by-the-java-swing-program/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.