chenbo 5 anni fa
parent
commit
129434ac92

+ 1 - 1
data/get_stock_all_code_name_by_sina.php

@@ -12,6 +12,6 @@ $exchange = safeCheck($_GET['exchange'], 0);
 $sector = safeCheck($_GET['sector']);
 $start = safeCheck($_GET['start']);
 
-Sina::getAllStockCodeAndName($exchange, $sector, $start, $start + MAX_SINA_COUNT - 1);
+Sina::getStockCodeAndNameList($exchange, $sector, $start, $start + MAX_SINA_COUNT - 1);
 
 ?>

+ 10 - 0
data/sh/get_stock_all_code_name_list.sh

@@ -0,0 +1,10 @@
+#!/bin/sh
+
+cd /home/wwwroot/default/boniu/data
+while [ 1 ]
+do
+	nohup /home/wwwroot/default/boniu/data get_stock_all_code_name_by_sina.php?exchange=sz&sector=20&start=0 &
+	sleep 3600
+	rm nohup.out
+	sleep 86400
+done

+ 0 - 0
data/sh/stock_all.sh


+ 1 - 1
lib/sina.class.php

@@ -68,7 +68,7 @@ class Sina
     }
 
     //获取全部股票代码和名称列表
-    static public function getAllStockCodeAndName($exchange, $sector, $start, $end)
+    static public function getStockCodeAndNameList($exchange, $sector, $start, $end)
     {
         $url = "http://hq.sinajs.cn/list=";
         $data['exchange'] = $exchange;