Recently, I have been busy developing applications that simulate stock trading. The first consideration is how to obtain stock data information. Later, I Googled it on Google and found that I relied on Sina's stock information interface. In the test
Recently, I have been busy developing applications that simulate stock trading. The first consideration is how to obtain stock data information. Later, I Googled it on Google and found that I relied on Sina's stock information interface. What we get in the test is a string, which can be directly used by javasript. what should we do if Ajax is used? I tried N methods. I had to use them after they were invalid. I first wrote them into a text file, then I read the file and rearranged the data into a json data stream. Feed back to js for output. This is the general idea. Upload the code.
However, it should be noted that the acquisition method is slow and takes a while, especially in the background using the flie () function in php.
If anyone has a good method, please let me know.