V
V
Vladislav Kolotsei2015-04-04 16:44:12
PHP
Vladislav Kolotsei, 2015-04-04 16:44:12

Client-server application for collecting information?

Guys, maybe there is some code of the program or a source where you can read about the following:
The program on the server must collect information from the file from the client with a certain frequency.
Give me some ideas or sources

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Alexander Rulev, 2015-04-04
@Rulexec

You can simply write a shell script that will sleep in a loop and send the contents of the file to the server via HTTP POST.

#!/bin/bash
while true
do
  curl --data-binary @/some/path/to/file http://remote-server.example/uploaded -sS > /dev/null
  sleep 60
done

And then process them on the other side with anything.
You can improve the script by watching the file change, and not just send on a timeout (for node.js, for example, you can use fs.watchFile).
Well, then, if the file is quite voluminous, think about how to send only the difference of changes, and not the whole thing.

X
xmoonlight, 2015-04-04
@xmoonlight

Where is the file on the client?
Which client device or..?

R
Roman Scriabin, 2015-04-04
@Romanche

If I understand correctly, you need to dig into java applets.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question