Using PHP Simple HTML DOM Parser for Google App Status

I wanted to use PHP Simple HTML DOM Parser to capture the Google Apps status table so that I could create my own dashboard that would only include the status of Google Mail and Google Talk, as well as change the presentation (html, css).

As a test, I wanted to find / display a table element, but it does not display any results.

$html = file_get_html('http://www.google.com/appsstatus');
$e = $html->find("table", 0);
echo $e->outertext; 

Although, if I find / output div elements, it will display the results.

$html = file_get_html('http://www.google.com/appsstatus');
$e = $html->find("div", 0);
echo $e->outertext;

Any help would be greatly appreciated.

+3
source share
1 answer

It is much simpler. All this data is bound in a JSON channel.

http://www.google.com/appsstatus/json/en

file_get_contents() , , dashboard.jsonp, json_decode() (doc), , - Google. print_r(), , .

Fiddler. .

+2

Source: https://habr.com/ru/post/1776029/


All Articles