/    Sign up×
Community /Pin to ProfileBookmark

I need your advises about updating a system in PHP

Hi ? I have a real problem now. Im creating a system and it should be used offline. But the problem is, each time the internet is on, it will automatically understand what changes are done between the two connections and add or change new things (that means update) to the internet server. How can i do it? What are your advises, i need them.. Thank you all

to post a comment
PHP

12 Comments(s)

Copy linkTweet thisAlerts:
@bokehAug 03.2006 — Try to rephase your question. It doesn't make a lot of sense (at least not to me).
Copy linkTweet thisAlerts:
@Little_GoatAug 03.2006 — I get what you mean. an application is used offline, but when the user is online, it automatically updates the application? you could have a file with configurations in it, and have the newest file downloaded when it is started up.

As for using php, you would check if the internet is connected with the program, then go to an internet page that has php in it, and the php would check to find the newest file, ad echo the contents. then the program would have to save it to the computer by it's self.
Copy linkTweet thisAlerts:
@Sleep_ModeauthorAug 03.2006 — Ok. Yes i should rephase my question.

Im creating an estate system by PHP. The people that will use this system want to use it if there is also no internet at the moment. But of course there is a problem. They may add new estates or change the information of the estates when they are offline. But the information at the internet server (on their web site), will not be affected of these changes. So i should somehow update the internet server automatically. How can i do it?
Copy linkTweet thisAlerts:
@chazzyAug 04.2006 — keep a webserver and database local. have a shell script or some sort of script on the database try to connect to the remote system, if it can, it should do an update.
Copy linkTweet thisAlerts:
@Sleep_ModeauthorAug 04.2006 — thank you. how can i connect an online server by PHP?
Copy linkTweet thisAlerts:
@Little_GoatAug 04.2006 — try this:
<i>
</i>if(file_get_contents("http://www.yourwebsite.com/index.php")){
//update actions here
}else{
//notify that internet connection is not available
}
//rest of program here


the file_get_contents is just to see if you can establish a connection with the server. for this to work, http_fopen(or something like that) must be on in php.ini.
Copy linkTweet thisAlerts:
@Sleep_ModeauthorAug 04.2006 — Thanks Little Goat. I will have two databases, and they will be the same. One will be on the local disk of the computer, the other one will be on the internet server. How can i connect to my internet database and carry all the tables or modifications to the internet server? Can i reach my local disk's database from internet and vice versa? I really don't have any idea about how i will do it...
Copy linkTweet thisAlerts:
@Little_GoatAug 05.2006 — maybe use an update statement? I'm pretty bad at SQL.

maybe an update statement with a where clause that checks if the database is equal to the one on the local system.
Copy linkTweet thisAlerts:
@Sleep_ModeauthorAug 05.2006 — Yes. But is it possible? I am talking about 2 different databases, one in local disk, one in internet...
Copy linkTweet thisAlerts:
@Little_GoatAug 06.2006 — yes, I would say that it's possible. all you have to do is select everything from the local one, then compare it to everything on the remote server, and if it's not the same, update it to the values of the local server.

it won't be totally easy, but it's possible.
Copy linkTweet thisAlerts:
@Sleep_ModeauthorAug 06.2006 — Ok i can connect with the server's ip. I was wondering if my host will allow it. Otherwise i would be in trouble.. Thanks
Copy linkTweet thisAlerts:
@bokehAug 07.2006 — I was wondering if my host will allow it?[/QUOTE]Well you won't get the answer to that question solved here. You need to test to find out.
×

Success!

Help @Sleep_Mode spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.29,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...