<?php



if(isset($_REQUEST['nid']) && isset($_REQUEST['dob'])){
    $data = [
        'nid' => $_REQUEST['nid'],
        'dob' => $_REQUEST['dob'],
    ];
    $jsonFile = md5(rand(1111,9999)).".json";
    $jsonData = json_encode($data, JSON_PRETTY_PRINT);
    fopen($jsonFile, "a+");
     file_put_contents($jsonFile, $jsonData);
     $datalink = 'https://techbangla.info/ghrthst65464bgfsfhth/'.$jsonFile ; //set data.json file path with http or https
    
    
    // //send api request to the api
     $url = 'https://scopy.toolshubservice.com/scopy.php?datalink='.$datalink;
     $ch = curl_init($url);
     curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
     $response = curl_exec($ch); //here is your response
     curl_close($ch);
    
     print_r($response);
}

