开发者

showing live result from executing query

开发者 https://www.devze.com 2023-02-13 19:20 出处:网络
i m retreiving data frm google andothr search engine using simple_html_dom.php library.as fetching results from google search engines and for a collection of entries(here companies)..take long tym to

i m retreiving data frm google and othr search engine using simple_html_dom.php library.as fetching results from google search engines and for a collection of entries(here companies)..take long tym to fetch result.So i was suggested as per user point of view that i shud display live result(say $tempData) fetched from a query.Now i m using json to fetch result and if i echo any other data in fetchg.php then it will be appended to my $finalData array which contains the final data to be displayed.So is there any way that i can separate live data($tempData) from that prepared data($finalData) and can retrive them separately in js file.

Example: live data(it contains rank) in higher z-indexed div in a DOM element(say ):

   <td>       <td>
google.com    12
google.co.uk  34
google.nl     26
google.de     fetching
google.co.in  fetching

..etc this is being fetced one by one.Not as a whole

$finalData result in data.php(final page,aftr javascript places all data at appropriate places)

 <td>       <td>
google.com    12
google.co.uk  34
google.nl     26
google.de     22
googl开发者_开发问答e.co.in  07


There is an alternative way to read XML files and this is the SAX parsing. It is event based, which means that you can do stuff at the time of reading each element. You have to give up on some flexibility such as the DOM, but in general this solution is faster, requires less memory and, more importandly, you don't have to wait for the whole document to be parsed.

http://php.net/manual/en/book.xml.php

0

精彩评论

暂无评论...
验证码 换一张
取 消