How to get the result of json into the json file. : I'm using a download api for some applications.
So when I'm entering the URL 1, I'll get the new generator URL2 as a result.  
Here is my code: 

    <?php
    $json=file_get_contents("URL 1");
    $details=json_decode($json);
    if($details->Response=='True')
    ?>
     <?php echo $details->data;?>
    
This is what I'm getting as result from the URL 1: 

    {"data": "URL2"}

___
I need the result of url 2 witches almost similar result as URL2 

    {"data": "DOWNLOAD LINK"}

___
I found on way just to post it to other page which is something that i don't want.

i want once i enter the first page it should download by it self.

ANY IDE? 




