I'm not really sure which forum this belongs in, but please bear with me as I try to explain what I am looking to do.

I have a PHP web site designed to display status updates from several dozen computers around the world. Up until now an administrator updates a single .csv file and uploads it to the site, after which PHP parses and displays the information. This is obvious very cumbersome, and has had too many inaccuracies due to the the human element. Therefore, I am looking to automate the update of the csv file directly from each of the computers.

I have designed a C++ program that runs locally on each machine, and will collect and format the respective line that will be updated in the .csv. Unfortunately this all happens locally, and still requires a manual upload. With that said, I am looking for any suggestions and help with being able to automate this process.

My current thought process is to remotely open the .csv file on the web server and update it directly from my C++ app. Or possible download, update, then re-upload. Or maybe PHP (with other technologies) provides the functionality to be able to take a string and update a text file on the server. I may be way off base here, which is probably the case because I wouldn't know how to accomplish these ideas anyway.

With that said, I am open to any and all suggestions to being able to do this. Obviously the simpler the better, but I am really stuck and looking for some thoughts to accomplishing this.

Thanks in advance,
Jim

It looks like I am playing in an un-explored area. ;)

After much research I am currently experimenting with FTP, I don't know if this is the best method but I think I can get it working fairly quickly. The downside is that I have to pre-configure my C++ app with credentials (or update stored info) in order to authenticate via FTP.

I have modified the architecture in that I only upload 5 five fields, then parse/update the central file with this new information with PHP. This puts more work on the server, but greatly simplifies the client side and definitely more scalable.

Anyway, please let me know if you have any other suggestions, I am always open to finding a new/better way of transmitting this data to my servers.

Thanks,
Jim

Can you summarize the whole bunch of words? I mean what you specifically want?

Quick 'n dirty: I need a way to upload a small bit of text (<200 bytes) to my web server... from my C++ app.

Quick 'n dirty: I need a way to upload a small bit of text (<200 bytes) to my web server.

PHP is capable of that in few lines if you do it manually. Also you can automate the task using Task Scheduler (Win) or crontab (*nix)

.. from my C++ app.

That smells like C++

You could use cURL and submit the csv to the web server via a form. curl is C++ and php

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.