NeoGeo wrote:
1.) Make sure register_globals = On in php.ini on server that hosts page A. Then just provide a link back to page A, something like this:
<a href="pageA.php?var1=$var1&var2=$var2">Link</a>
Then $var1 and $var2 will be available in page A.
Can I just add. Never use register_globals = on. This is depreciated and causes all sorts of security risks. You don't need register globals on for this 'hack' and you don't need to use post. Read more about register_globals here : http://uk.php.net/register_globals
if you want to get the variables out of the url. use $GET rather then $POST. Let me explain how to do that above method described by NeoGeo...
Pagea (local server) uses
$r = file_get_contents('www.remoteserver.com/pageb.php?id=something&info=somethingelse');
pageb reads those variables;
ie.
echo $_GET['id']; // displays 'something'
this page then can output some XML or JSON or whatever data encoding you want.
Then $r, in the example above contains the returned data to be processed.
Make sense? Note this has some security problems - so don't use this method if the data is not public anyway.
I'd still recommend web services. (They are very cool things and cross language compatible too. I'm writing one in c#.net 1.1 just now actually)