cURL returning XML or JSON
just encode it as you want, and echo it to the page. your $data= will contain the echoed contents. Personal preference has been to use JSON since it's so easy to throw around. as in
//Bunch of DB stuff..$row=mysql_fetch_however_you_handle_it();echo json_encode($row);//on your receiving end, that just did the cURL send,$row=json_decode($data,true);//decode the JSON straight into an array...