Since your application server is PHP, I'd suggest going with
AMFPHP instead of Flash Remoting. Using AMFPHP, you'll be able to
program your classes in familiar PHP syntax.
Connecting to remoting services from FMS is pretty much the
same as using remoting with the Flashplayer client. See the FMS
docs on the netServices class.
In short, AMFPHP/Remoting goes on your http/db server, and
FMS connects to it as a service.
If you are installing your http server on the same machine as
FMS, you'll want to give FMS it's own IP address. This will
eliminate the port 80 conflict mentioned above.
To explain, FMS uses port 80 to connect clients with
firewalls that block port 1935 (the FMS default port). If an http
server is already listening to port 80, FMS can't. If FMS manages
to grab port 80 before the http server does, the http server will
be unavilaible to your clients.