[請益] 如何curl這網站資訊呢?

作者: jami520 (我的生命因你而發光)   2015-10-06 20:38:57
單純點選網址可以正常看到資訊 http://goo.gl/v9Yr5r
但使用curl並沒有任何數據顯示,不曉得是哪邊的問題呢? 謝謝
$c = curl_init();
curl_setopt($c, CURLOPT_URL,
"http://mis.twse.com.tw/stock/api/getStockInfo.jsp?ex_ch=tse_3008.tw|tse_2330.
tw&json=1&delay=0&d=20151006");
curl_setopt($c, CURLOPT_RETURNTRANSFER, 1);
$timeout = 15;
curl_setopt($c, CURLOPT_CONNECTTIMEOUT, $timeout);
$data = curl_exec($c);
curl_close($c)
echo $data;

Links booklink

Contact Us: admin [ a t ] ucptt.com