Don't know whether this is the appropriate forum or not for this question. Below mentioned code was working fine till day before yesterday. But now showing Resource Not Found. But, if I open another new tab and copy paste the URL, results are showing. And then again if I run the code, it's showing the desired result. Can anyone dealing with NSE data, guide me in this regard.
<html>
<head><title>test</title></head>
<body>
<?php
$url = 'https://www.nseindia.com/api/corporates-pit?index=equities&from_date=21-06-2020&to_date=21-09-2020&symbol=JUSTDIAL';
$response = getJSONData($url);
print_r($response);
function getJsonData($url){
print_r($url);
$ch = curl_init();
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_URL, $url);
$result = curl_exec($ch);
print_r($result);
curl_close($ch);
$obj = json_decode($result,true);
return $obj;
}
?>
</body>
</html>