JSON on local network, post to web

mkrohn

2[H]4U
Joined
Apr 30, 2012
Messages
2,345
I'd like to be able to just compile an EXE and have a .conf file and just leave it running on say my desktop. What language has the best libraries for something pretty simple like this? just grabbing a JSON file from an IP on my local network and forwarding/posting that data to the web so that I can have this data remotely. I'm hoping perhaps there's something that already does this and I just haven't googled the right terms yet.
 
So you're looking for an EXE to periodically copy a file (with JSON contents) and copy it to another location? If that's all, then setup a scheduled task or cron job copy the file at a pre-determined interval.

If you actually need to do something with the JSON data itself, then many languages have helper libraries. At which point we would need to know what the OS and infrastructure limitations are in the host environment.

Edit:
Ok, I mis-read the original post. Are you looking to do an actual HTTP POST to a URL? Is this a vendor product, or some home-grown implementation? SOAP or REST? What OS will the running application be on?
 
Last edited:
It is difficult to understand your requirements. Would copying the file to dropbox periodically be satisfactory? What is the level confidentiality (if any) required for handling this data? Could it be posted to a public google drive URL, for instance.
 
Depending on what languages you are familiar with, Python is usually a safe bet on ease of use. If you are looking to POST to a URL, that is going to do something with the data, the Requests lib has been good to me in the past. http://docs.python-requests.org/en/latest/

Maybe you want to send it to FTP, Python can do that pretty simply. I found this gist with a script to do it https://gist.github.com/slok/1447559
Here are the docs on ftplib https://docs.python.org/2/library/ftplib.html

You can run the script as a cron or task scheduler as PTNL suggested.

Also, I haven't tried it, but you should be able to upload to Google Drive with Python as well
https://developers.google.com/drive/web/quickstart/quickstart-python
 
A PHP script can read/write JSON format and the above posts' websites have API ability to make it even more simple assuming you want public access to the contents in any format.
 
This is easily achieved utilizing scripts. Developing a standalone application for this purpose would be clumsy.
 
If you guys could keep this thread on topic, that would be great. Any other conversations could be kept to PM if you want.
 
I'm not quite sure why you need JSON, but format problems aside it sounds like most of your requirements could be solved by installing a database server.
 
Back
Top