1
I wanted to know if it is possible and, if so, which technologies I can use to create an application that runs offline and when the user has connected to the net, the data is taken to the server (hosting) automatically?
1
I wanted to know if it is possible and, if so, which technologies I can use to create an application that runs offline and when the user has connected to the net, the data is taken to the server (hosting) automatically?
0
It is impossible to answer because there are several ways to solve and there is no way to determine which technique is best suited to your specific case. To determine you need to make a thorough analysis of your project and yet there may be conflicts of opinion about what is most appropriate or not. In short, too broad a theme and based on opinions
But if you really want to know if it’s possible, yes, it’s possible.
You can run the PHP application offline on the client’s local machine and have the same application online on a server. You can even install Mysql in the client. Anyway, the client itself would be at the same time the server for the offline version.
Perhaps the most critical point is synchronization between offline data and online data.
If the application is unique to a single client (a single computer), this will not be a problem, but if there is more than 1 client, the thing complicates as it should be more careful regarding duplicate keys, etc.
Even if it is only 1 customer, one should take care.
Another example is, if there is more than one user, suppose one of these deleted a record and synchronized. The next day another user who is offline needs this record. On his PC the record still exists so he makes the pins he needs to make and synchronizes. Then it starts to play on everything because the other user had deleted the day before.
Dealing with single keys is easy. But as you can see, in this small example of deletion the thing starts to complicate.
Therefore, I repeat what I mentioned above, without analyzing the complete project there is no way to indicate to it adequately what can be better applied.
The key point of all this is logistics. Think of logistics and the project itself to determine what might be feasible.
0
The sqlite follows the same principle of mysql, how do you use the php, follows an example: http://php.net/manual/en/sqlite.setup.php, in your case you would make a if
checking if there is connectivity, starting from this idea there are two ways to track this request:
More about the Sqlite: http://www.devmedia.com.br/sqlite-o-pequeno-notavel/7249.
Vlw, man. I’ll try to implement it right away!
I’m happy to help
-1
PHP is a server-side language, meaning you need to send data to the server, which will return a response. So PHP cannot run on a machine without a web service running.
At least it would be necessary to have an apache, Nginx or localhost(wamp/xammp/Lamp) running on each machine that intends to use its site offline, it would need to be fully stored in the browser cache. You would need to store data in cookies, etc...
It’s even possible, but it can be unfeasible depending on the type of service you intend to offer
It was not me who gave the negative, but this is wrong: "So PHP cannot run on a machine without a web service running.". PHP can be run normally as an executable with no web or browser involved.
Browser other questions tagged php mysql
You are not signed in. Login or sign up in order to post.
you can use the browser sqlite to store and then send the stored data to the server online
– Marcos Henrique
Even closing the browser data still got saved?
– Josivan Sousa
yes guy, it saved in the browser "memory", it would be like an internal browser database
– Marcos Henrique
I see. Vlw, Marcos!
– Josivan Sousa
I’ll give you an example, but in javascript
– Marcos Henrique
It is impossible to answer because there are several ways to solve and there is no way to determine which technique is best suited to your specific case. To determine you need to make a thorough analysis of your project and yet there may be conflicts of opinion about what is most appropriate or not. In short, too broad a theme and based on opinions.
– Daniel Omine
Despite an interesting question, the site is for questions and objective answers, and your question is more suitable for the exchange of opinions and discussion, that escape our format. Here are some tips on the questions that work well in our format: [Ask], What kind of questions should I avoid asking?, What topics can I ask and [Help].
– Bacco