【发布时间】:2020-08-06 22:49:43
【问题描述】:
听说我正在尝试访问 NSEIndia.com 网站 URL“https://www1.nseindia.com/live_market/dynaContent/live_watch/stock_watch/niftySmallcap50OnlineStockWatch.json”。
当我在浏览器中打开它时它工作正常,但当我尝试使用 php file_get_contents 打开它时它不起作用。
请帮助我或建议我应该以其他方式尝试什么,以便在我的代码中收到此 URL 的输出。
$url = "https://www1.nseindia.com/live_market/dynaContent/live_watch/stock_watch/niftySmallcap50OnlineStockWatch.json";
echo file_get_contents( $url );
die;
非常感谢您。
【问题讨论】:
-
您好,您找到解决方案了吗?
标签: php http curl file-get-contents