I've got a Joomla controller that iterates numerous occasions over some Google Checkout XML code. Things I want is throughout this iteration, Publish data to a different page - within the same site.


com_mycomponent/controllers/checkout_iterator.php //breaks up the xml into small parts and posts then to the executor, one at a time
com_mycomponent/controllers/checkout_executor.php //does the real work for each XML element it is passed

The iterator.php controller will Publish data to executor.php maybe 2 as well as 50 occasions.

How do i do that?

To publish data to some page in php, you should use the cURL extension

A fast and dirty way might be such as this..

$c = curl_init();
curl_setopt($c, CURLOPT_URL, 'com_mycomponent/controllers/checkout_executor.php');
curl_setopt($c, CURLOPT_HEADER, false);
curl_setopt($c, CURLOPT_POST, true);

// send data
curl_setopt($c, CURLOPT_POSTFIELDS, 'a=1&b=2..');
// other data.. we can use same handle
curl_setopt($c, CURLOPT_POSTFIELDS, 'a=1&b=2..');

// don't forget to close