|
|
@@ -8,7 +8,7 @@
|
|
|
|
|
|
class Input_sina_simple
|
|
|
{
|
|
|
- private $globalUrl = "http://hq.sinajs.cn/list=";
|
|
|
+ const GLOBAL_URL = "http://hq.sinajs.cn/list=";
|
|
|
|
|
|
static private function curl_get_data($url, $codeList){ //一次批量获取股票列表
|
|
|
if (empty($codeList)) {
|
|
|
@@ -49,7 +49,7 @@ class Input_sina_simple
|
|
|
$data['sector'] = $sector;
|
|
|
$codeList = array();
|
|
|
$codeIndex = 0;
|
|
|
- $url = $this->globalUrl;
|
|
|
+ $url = self::GLOBAL_URL;
|
|
|
for($code = $start;$code < $end; $code++){
|
|
|
$codeStr = sprintf('%06s', $code);
|
|
|
$url .= 's_'.$exchange.$codeStr.',';
|