Through the Sina stock market interface, how to judge the same day in addition to the right to ex-dividend stock?

Source: Internet
Author: User
I want to make a function, click the button, you can put the same day ex-dividend shares listed, my website stock quotes is called Sina interface.
Do not know who has developed this function, or have the technology to develop this small function, I am not very grateful, but also can be paid token mind OH.


Reply to discussion (solution)

Is there anyone in the wood? Ask for help!!!

You have to come up with the interface.

No data presentation bad judgment how to handle

$curl =&new curl_http_client (); $html _data= $curl->fetch_url ("http://hq.sinajs.cn/list=". $StockList, "", 5); $ Html_data=iconv ("GB2312", "UTF-8", $html _data), $data = ", if ($html _data) {Preg_match_all ("/str_ (. +?) \ ";/is", $html _data, $data); $messages =str_replace (' = "',", ", $data [1]);} $list = "; $i =0;foreach ($messages as $l) {$N =split (', ', $l); $N [0]=substr ($N [0],2]; $CJ = round ($N [4]-$N [3],2]; $CJL = Ceil ($N [9]/100); Volume (hand) $ZDF = Round (($N [4]-$N [3]) *100/$N [4],2]; Change $color = $CJ >=0? ' #FF0000 ': ' #008000 '; $bgcolor = (($i + 1)%2==0)? ' #F5F5F5 ': ' #ffffff ', if ($N [4]==0)//suspension {$color = ' #000000 '; $N [4]= '--'; $CJL = '--'; $CJ = '--'; $ZDF = '--'; $N [7]= '--'; $N [8] = '--'; $N [2]= '--'; $N [5]= '--'; $N [6]= '--';} $html. = ''; $html. = ''; $html. = "". $N [0].""; Code $html. = "". $N [1].""; Name $html. = ''. $N [4]. ''; Current price $html. = ''. $cjl. ''; Volume $html. = ''. ($CJ >0? ' + '. $CJ: $CJ). ''; Ups and downs $html. = ''. ($CJ >0? ' + ': '). $zdf. ''; Change $html. = ''. $N [7]. ''; Bid $html. = ''. $N [8]. ''; Ask $html. = ''. $N [2]. ''; Open price $html. = ''. $N [5]. ''; High price $html. = ''. $N [6]. ''; Lowest price $html. = ''. $N [3]. ''; Yesterday's price $html. = ''. $N [32]. ''; Time $html. = ''; $html. = ''; $i + +;}

In fact, if used Sina this stock market interface of a look to understand what I said, but I still put it out.
I want to make a function, click the button, you can put the same day ex-dividend shares listed.

Can't wait for the answer 、、、、、

Click on the button to list the same day ex-dividend shares, which means:

You want to get all the stock information, not a few stocks;
The stock information obtained contains the ex-dividend information information item.

and Sina market interface two conditions are not satisfied:
Only a few stocks (stocklist) of data can be obtained at a time, and frequent access estimates are rejected
The data has no ex-dividend information, which you can see from the returned data.

I don't know if you're going to do stock data analysis, it is not possible to obtain data by this way, the need for more professional data acquisition method, professional data volume A-share a trading there is a good hundreds of trillion!

A trading day will have a good hundreds of trillion!

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.