views:

30

answers:

2

Hi all,

I have a php application running on the local xampp server, the application has data that needs to be synced with a website database. The application and website are in php/mysql...My question is how can i sync them up keeping in mind security issues.

Thnx.

A: 

A clever and quasi secure method would be to use SSL and HTTP auth to post PHP serialized data to the website with some sort of query/post params that the website checks for. Obviously not impenetrable, but it'd avoid the casual exploiter and be relatively simple to implement.

Myles
what about letting my local application access the database hosted on the site
majimoto
Not recommended, that would be opening up your database to the public. Sure it's technically feasible, but I wouldn't want to do it.
Myles
A: 

If, as you say, both applications are relying on MySQL, you can consider using MySQL database replication - set one server as master, second as slave. That way your database on slave server will always be up-to-date.

You can read more about MySQL database replication here: http://dev.mysql.com/doc/refman/5.1/en/replication.html

leafnode