arkadaşlar benim iki tane sitem var. A sitesinden B sitesine veri gönderiyorum curl ile ama b sitesinden geri dönüşü nasıl yapacam. örnek vermek gerekirse.

$url = "https://www.bsitesi.com/kontrol.php";
$post_veri = array(
  'username' => "admin"
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS,$post_veri);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_USERAGENT,$_SERVER["HTTP_USER_AGENT"]);
$veri = curl_exec($ch);
curl_close ($ch);
echo $veri;
A sitesinden admin kullanıcı adını b sitesindeki kontrol.php sayfasına post ediyorum. B sitesinde de gelen username adını alıp databasenden üyeler tablosundan bulup e-mail adresini geri dönmek istiyorum. Bunu nasıl yaparım.

yardımcı olabilir misiniz.