hocam aynı cozum yapabilirsiniz sana kodları atıyorum
<?php
$url="xx.com/apı/abc.php";
$json = file_get_contents("$url") or die("failed");
$json= json_decode($Json, true);

$myfile = fopen("newfile.json", "w") or die("Unable to open file!");
fwrite($myfile, $json);

fclose($myfile);
?>