First, you could put a script on server b like:
<?
if ($FILES[load])
rename($FILES[tmp_name][load], '/path/to/destination');
?>
And then on server "A";
<?
$fp=fopen("http://www.serverb.com", 'w');
fwrite($fp, $stuff2save);
fclose($fp);
?>
##################################
Or,
Server A:
<?
$cmd="scp $infile $server:$path2saveto";
echo $cmd;
?>
Server B:
make sure you have RSA keys installed for scp from server A
###################################
or,
Server A:
<?
$fp=fopen("$httpdir/transfer.file", 'w');
fwrite($fp, $stuff2transfer);
fclose($fp);
?>
Server B:
<?
$fp=fopen("$servera/transfer.file", 'r');
$fsave=fopen("/path/to/file/transfer.file", 'w');
while ($line=fgets($fp, 1024))
fwrite($fsave, $line);
fclose($fsave);
fclose($fp);
?>
#####################################
Or,
Same as previous for server a, but on server b:
<?
$cmd="wget $serverb/transfer.file";
$cmd;
rename ('transfer.file', '/path/to/destination');
?>
There are LOTS of ways... you can use an email attachment with a parser on server b. (I use this one alot when time sensitivity isn't important) You can use FTP (as already has been suggested) - I guess the real question is, how secure does the transfer need to be? If security is really an issue, you probably want to use the SSH method. Or encrypt using mcrypt before you copy the file over. (think synchronous encryption in a function)
Hope this helps...