Answer the question
In order to leave comments, you need to log in
How to organize the process of exchanging files (up to 1-2mb) mainly .csv between the client and the server?
Good afternoon, IT specialists!
I ask for help with the choice of technology for solving the following problem: It is
necessary to organize the process of exchanging files (up to 1-2 MB) mainly .csv between the client and the server:
The client is a cross-platform console application for unix and win.
The server is a php script, namely php and nothing else due to certain restrictions.
How it works: The client connects to the server, logs in (simple login password), requests files, if any, receives and puts them in a folder. Sends a file transfer command, transfers from another folder. Breaks the connection.
At the moment I doubt between SOAP || socket, but perhaps there are more rational solutions.
I don’t really want to mess with soap in view of its complex configuration and ambiguity of application to this task, but the absence of a constantly running process is captivating.
Sockets are perfect, but it's an ongoing process.
Get on the right path.
1. Which technology to choose?
2. What is the best way to organize the file transfer process? Split and transfer in binary form?
3. What is the best (easier, faster, more convenient) way to write a client?
Thank you.
Answer the question
In order to leave comments, you need to log in
Why reinvent the wheel? Set up any small web server that will accept client connections via HTTP protocol, transfer files and parameters to the php script.
The client can be written in C with the curl library and there is no need to rack your brains with file transfers. Everything will work transparently over the HTTP protocol. For Windows, compile using cygwin.
If you don't know other languages besides PHP, use console PHP on the client as well - available for windows, linux and macos. In this case, the easiest way to transfer files is to use banal HTTP. The whole task with all the jokes and jokes is for the evening.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question