For a remote script, try using fopen with a URL. You can specify form variables in the URL, then read the generated page as if it were a regular file.
http://www.php.net/fopen
For anything moderately complex you might want to look into XML-RPC instead. It provides a standard interface for this kind of remote access, and takes care of a lot of the little details so you can concentrate on the actual code. However, it requires both sides of the communication to support it, which may not be possible if the remote site is not under your control.