While working with your example, I found that it failed until I changed the JSON conversion line to:
$data_string = “json=” . json_encode($data) . “&”;

index.php
——
“isInstalled”,
“params” => Array
(
“1” => “3”,
“2” => “4”,
)
);

$data_string = “json=” . json_encode($data) . “&”;
$ch = curl_init(“http://localhose/parrot.php”);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string);
$results = curl_exec($ch);

print ($results);
?>
=====

parrot.php
——