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!
I want my hardware to interact with web.
So for that i have a desktop application at client machine which will generate a text file after getting data from hardware.
Now i want that text file to be read by server and get its data so that i can manipulate data on server and make it accessible from anywhere.
I am not much into PHP but i can make it work with some HELP, Suggestion or Example.
Have the client machine either copy the file to a share on the server or some other intermediate share that is accessible to both the client and server. Maybe have this copy done after the desktop app creates the text file.
mysql_function(): WARNING: This extension is deprecated as of PHP 5.5.0, and will be removed in the future. Instead, the MySQLi or PDO_MySQLextension should be used. See also MySQL: choosing an API guide and related FAQ for more information.
One of the way to achieve it is to store your generated file on some File Server / DB Server (Anyhow this can again only be written in Client Application) if you need automation.
Workaround if you cannot modify your application: You can write a watch script which will be monitoring your generated file. Upon any change trigger a request which sends your file to some safe location (again it needs to be server). If you feel data update happens too often then setup CRON command to do this job after regular interval.
Again there may be ways to do it. These are few easy ways though.
I want my hardware to interact with web.
So for that i have a desktop application at client machine which will generate a text file after getting data from hardware.
Now i want that text file to be read by server and get its data so that i can manipulate data on server and make it accessible from anywhere.
I think the first question is whether this is a push or pull architecture. Given what you have described, I think it makes the most sense for the desktop application to push the data to the web server. To do that you just need to implement a web service on the web server. Then the applications can push data whenever they need to. The central web server can the process that data and make it available as needed. Use SOAP or similar for you web service. I would recommend using a HTTPS connection as well. Also, the web server can return data to the desktop application in the response if needed.