Aşağıda bir örnek veriyorum kendine göre düzenleyebilirsin ben bu biçimde kullanıyorum.

//$id = $_GET['id'];
$id = 1279;
$fields = array(
"email" => "asdfc@ff.com",
"lpass" => "11223344"
);

$ch = curl_init();


$options = array(
CURLOPT_URL => "https://test.com/login.php",
CURLOPT_COOKIEJAR => "cookie.txt",
CURLOPT_COOKIEFILE => "cookie.txt",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => $fields
);
curl_setopt_array($ch, $options);
curl_exec($ch);



$fields = array('id' => $id);

$options2 = array(
CURLOPT_URL => "http://test.com/detay.php",
CURLOPT_COOKIEFILE => "cookie.txt",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => $fields
);
curl_setopt_array($ch, $options2);
$page = curl_exec($ch);
echo $page;
curl_close();
?>