Calling PHP script on a second server

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

The problem:
I have script_1.php on a server. I'd like to call a script_2.php which
is on a second server (remote one). Script_2.php is to do some
processing on a second server and return results to script_1.php.
Basing on the results script_1 goes on, using the results.

Is a construction in script_1.php

    require("second serverů/script_2.php");

a good direction? (I need environment variables in script_1.php to be
preserved after calling script_2.php). Or the problem needs quite
different solution?

Thanks in advance

Marek Kotowski

Site Timeline