I have two php database apps on different servers. I would like to be able to transfer the data from a particular record from the first server to the second, with some processing inbetween to account for the differences in database schema. The two servers cannot access each others databases. So the user would click a link on the record and then basically that data would be transferred over to the other server for confirmation. I looked at a redirect with POST, but that doesn't seem to be possible. Any better ways?
Select record on server 1 -> Process record to correct form -> transfer PHP array to server 2 -> confirmation page on server 2
you can use curl as i mentioned with the help of this example
//assuming the variable that holds your record is $row
$row = array("key1" => "value1", "key2" => "value2");
$post_fields = "";
foreach($row as $key=>$field){
$post_fields .= $key . "=" . $field . "&";
}
$Curl_Session = curl_init('http://yourseconddomain.com/yourfile.php');
curl_setopt ($Curl_Session, CURLOPT_POST, 1);
curl_setopt ($Curl_Session, CURLOPT_POSTFIELDS, $post_fields);
curl_setopt ($Curl_Session, CURLOPT_FOLLOWLOCATION, 1);
curl_exec ($Curl_Session);
curl_close ($Curl_Session);