using JAVA FTP applet with PHP

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
samsonbo
Forum Newbie
Posts: 1
Joined: Mon Dec 04, 2006 5:47 am

using JAVA FTP applet with PHP

Post by samsonbo »

Hello friends,
Now in my application the users of our website are adding the low-rez videos to the webiste, but from nowon we want to upload high-rez videos with the relevant data just like they upload images and other files. The problem is that with large video files regular http uploading may not work well. so decided to use JAVA FTP applet, which can resume uploads even after any interruptions.
can any one suggest me or help me how to code it or give any address for articles.

Thanks,
samson.
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

An ftp server doesn't have much to do with php. Do you have a concrete concept?
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Re: using JAVA FTP applet with PHP

Post by Chris Corbyn »

samsonbo wrote:Hello friends,
Now in my application the users of our website are adding the low-rez videos to the webiste, but from nowon we want to upload high-rez videos with the relevant data just like they upload images and other files. The problem is that with large video files regular http uploading may not work well. so decided to use JAVA FTP applet, which can resume uploads even after any interruptions.
can any one suggest me or help me how to code it or give any address for articles.

Thanks,
samson.
It sounds like this has little to do with PHP. It might be easier to run a servlet which has an open socket you can communicate with via the Applet.

Assuming you send the file in a streamed fashion with the applet it should be a case of:

* Open file with applet/file handling objects
* Open connection to remote socket with applet/net/io objects
* Send request to remote service with filename, filesize
* Server reports number of bytes already present if any
* Send chunks of say 8192 bytes
* Server appends bytes to existing file

Might have a shot at that myself if I get bored today :)

EDIT | I'd send a MD5 hash too and verify it once uploaded.
Post Reply