views:

63

answers:

1
+1  A: 

I would not sync data via php or http in general if i don't have to. I'd use simple things like scp, rsync or, if the data relates to my application some version control, such as git.

However, doing this via php could look something like this:

<!-- server side, lets say the url is http://example.org/sync.php -->
<?php 
    insert_stuff($_GET["username"], $_GET["password"]); 
    echo "Inserted.\n";
?>

Locally, i'd use curl:

$ curl "http://example.org/sync.php?username=root&amp;password=root"
Inserted.

...

The MYYN