Through the Sina stock market interface, how can I determine the stock with the same day's permission and interest removal? I want to create a function. click the button to list the shares with the same day's permission and interest removal. The stock market on my website is the Sina interface called.
I don't know who has developed this function, or who has developed this small function by technology. I am not very grateful for it, but I am also very grateful for it.
Reply to discussion (solution)
Is there anyone there? Please help !!!
You need to check out the interface
No data demonstration is difficult to determine 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); // transaction volume (hand) $ zdf = round ($ N [4]-$ N [3]) * 100/$ N [4], 2); // rise/fall $ color = $ cj> = 0? '# Ff000000':' #008000 '; $ bgcolor = ($ I + 1) % 2 = 0 )? '# F5F5F5': '# ffff'; 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 .''; // Transaction volume $ html. =''. ($ Cj> 0? '+'. $ Cj: $ cj ).''; // Rise/fall $ html. =''. ($ Cj> 0? '+': ''). $ Zdf .''; // Increase/decrease $ html. =''. $ N [7].''; // Price $ html. =''. $ N [8].''; // Selling price $ html. =''. $ N [2].''; // Open pipeline $ html. =''. $ N [5].''; // Maximum price $ html. =''. $ N [6].''; // The lowest price $ html. =''. $ N [3].''; // Renewal price $ html. =''. $ N [32].''; // Time $ html. =''; $ Html. =''; $ I ++ ;}
In fact, if you have used Sina's stock market interface, you will understand what I said, but I will post it.
I want to create a function. click the button to list the shares of the current day in addition to permission and interest.
No answers ,,,,,
Click the Next button to list the shares with the same day's permission-based dividend, which means:
You need to obtain information about all the stocks, not a few stocks;
The obtained stock information includes the permission and interest removal information items.
However, neither of the following conditions is met:
Only data of the specified stock list can be obtained at a time. frequent access estimation will be rejected.
The data has no permission-based information, which can be viewed from the returned data.
I don't know if you want to analyze the stock data. if you want to obtain the data in this way, you can't do it. you need more professional data acquisition methods. the amount of professional data in A-share transactions is several hundred megabytes!
There are hundreds of megabytes in a transaction day!