I have a new project deal in hand. The project is to make a web application interface to collect a huge information about people in a particular area.
For example, In Film world,s there are director,camera-man, screen writer etc.
So the project aims to build a database back end with an advanced searchable fronted using tags,names etc.
So the issue here, Data uploading will be time-to-time. Like , whenver a new info came, that entry will be added to the database. but if there is no Internet available, then this data should be added to the local database and next time internet get available, this database should be synchronized to the main Database Server.
So in a nutshell..

--is it possible to create a php web application which supports automatic synchronisation??
--if yes, can any one please shed some light on these issues??

Recommended Answers

All 4 Replies

Member Avatar for diafol

You could set up a cron job (to run a php script) to sync local -> remote, but the control will be on the local db, unless your local db is readable from the web (I assume not)?

There is nothing built into PHP to explicitly support this (that I'm aware of). You can certainly build an application to support it, assuming that you have some PHP experience as well as the appropriate knowledge to build the local client component. There are some utilities around (e.g. MySync and DBSync) that might be usable but I can't recommend them because I have never used them.

If you have only one local database and one entry point, then the "synchronization" is pretty easy. If you keep a local log of changes you can go by entry date and check if the most recent changes were applied and, if not then do the update. If you don't keep a log, then keep a date last updated in your local database and work backwards using that. The simplest approach may be for your local program to act like / through a browser and generate a form with all the required fields. A small PHP program on the other end will be the "action" for the form and it will receive and process the data fields in the form. If you need to go the other way and update your local database as well, then your local program could talk to a php program on the other end that would feed it the database records. If the database is going to get quite large, it may need some sophistication so it can avoid processing every record.

You could set up a cron job (to run a php script) to sync local -> remote, but the control will be on the local db, unless your local db is readable from the web (I assume not)?

'


thanx for the suggestion.. but I dont think client machine will be a linux machine.(cron on linux machine only right?).. I did not start coding design yet so I dont determine the access permission level yet.
I will update the scenario up with the development.

@chrishea..

that was really informative..thanx a ton.I will try those tools once..

The simplest approach may be for your local program to act like / through a browser and generate a form with all the required fields[/B]

yes that is my very idea also. I intend to build a web interface( through browser) or using any other web-runtime platform like Adobe AiR etc(mostly , I would prefer firefox or prism)..

anyways, I will update the situation time to time..

and thanx a lot.. This is my first query to this forum and this forums excel with its user interaction..
cheeers..

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.