Hi this question has similarity with this post:
But unfortunately, it's not working with PHP.
header('charset=utf8');
$rr=file_get_contents("https://www.google.com/finance/info?q=NSE:TCS");
$json = json_decode($rr, true);
echo '<pre>' . print_r($json, true) . '</pre>';
This shows only blank. No data.
using only file_get_contents gives something like this.
// [ { "id": "784961" ,"t" : "TCS" ,"e" : "NSE" ,"l" : "2,437.00" ,"l_fix" :
"2437.00" ,"l_cur" : "₹2,437.00" ,"s": "0" ,"ltt":"3:49PM GMT+5:30" ,"lt" :
"Jul 20, 3:49PM GMT+5:30" ,"lt_dts" : "2017-07-20T15:49:12Z" ,"c" : "-12.60"
,"c_fix" : "-12.60" ,"cp" : "-0.51" ,"cp_fix" : "-0.51" ,"ccol" : "chr"
,"pcls_fix" : "2449.6" } ]
If json_decode doesn't work then what are my options to do it in other way. I will show data in table format or each shares.
full quote link
http://www.google.com/finance/info?infotype=infoquoteall&q=NSE:TCS"