Few comments/answers:
With a DVCS (with a 'D' as Distributed), there is no 'server' or 'client'.
If you want to access the code locally (on your workstation), you will need a DVCS (git or Mercurial), and you would clone an upstream repo (that is, a remote repo stored in GitHub or BitBucket).
For what I understand, each user would fork the main repo, creating one repo per user, still stored on the upstream server (GitHub or BitBucket), since it is the idea behind a fork (clone on the remote side).
That would address 1. since each user is the owner of his/her own fork, and have write access only there.
2. is a given (you can fork a repo)
The rest of the points won't be addressed by GitHub or BitBucket, but by a dedicated server, where you have a DVCS installed, and where you have added the relevant hook in order to automate what you want.
That dedicated server can monitor what is pushed on GitHub or BitBucket, for a given repo of a given user, do the required clone or update, and sync the repo to the right directories (accessible to the PHP script in your case, for instance).
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…