I need to synchronize the project folder on my local machine with the same folder on the server so that when I change the local or the remote file they are immediately synchronized. How can I do this?
Source version control software (CVS, SVN, git, etc) is typically exactly what you want in this type of situation.
They do not provide immediate synchronization, but I suspect that you want to re-think why you need that. There will likely be trouble if your production server is updated every time you change a file on your desktop. What if you hit save half-way through some changes?
If you don't want to mess with keeping a history of changes, use a utility like rsync to keep the two systems synchronized periodically.
If you're positive that you must have immediate synchronization, then there is likely no need to have a copy on both systems. Just mount the directory from the server on your desktop (via sshfs, mapped network drive, etc) and make the changes directly to the files.
Personally, I'd go with what i_grok suggested by using SVN, P4 or Git. Reason being, is that what happens when you make a bad change to your code and now you've sent your site down the tubes. However you can do as i_grok also suggested with a mapped network drive or sshfs or you can write a custom python script within your working directory to auto-upload.