Have you looked into rsync? It's bundled with USBNetwork, and it pretty much does what you want (ie: one or two way directory sync) without extra round-trips, and a simple rsync server instead of a LAMP setup.
(I might be biased in favor of rsync as a Gentoo user, but, honestly, it rocks!

)