<?php include_once('simple_html_dom.php'); //ŁĄCZENIE SIĘ ZE STRONĄ STATYSTYK $ch = curl_init("http://worldoftanks.eu/community/accounts/502674822-majes_pl/"); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $output= curl_exec($ch); //KONWERSJA HTML DOM $html = str_get_html($output); //DATA REJESTRACJI foreach( $html->find('div.b-data-create') as $b ) { $stamp = $b->find('span',0); $wotStats['register'] = $stamp->getAttribute('data-timestamp'); } //DATA AKTUALIZACJI foreach( $html->find('div.b-data-date') as $b) { $stamp = $b->find('span',0); $wotStats['update'] = $stamp->getAttribute('data-timestamp'); } //INFO KLANOWE foreach ($html->find('div.b-clan-list') as $b) { $wotStats['clan_url'] = $b->find('a',0)->getAttribute('href'); $wotStats['clan_img'] = $b->find('img',0)->getAttribute('src'); $wotStats['clan_tag'] = $b->find('span.tag',0)->plaintext; $wotStats['clan_name'] = $b->find('span.name',0)->plaintext; $wotStats['clan_motto'] = $b->find('p.motto',0)->plaintext; $wotStats['clan_days'] = $b->find('td.first',0)->find('span',0)->plaintext; $wotStats['clan_enrolled'] = $b->find('td.first',0)->next_sibling()->find('span',0)->getAttribute('data-timestamp'); } //REZULTATY foreach($html->find('table.t-table-dotted') as $t) { $table = $t->find('th',0)->plaintext; if ($table == "Overall Results") { $wotStats['battles'] = fixStat($t->find('td.td-number-nowidth',0)->plaintext); $wotStats['victories'] = fixStat($t->find('td.td-number-nowidth',1)->plaintext); $wotStats['defeats'] = fixStat($t->find('td.td-number-nowidth',2)->plaintext); $wotStats['survived'] = fixStat($t->find('td.td-number-nowidth',3)->plaintext); } } ?>
Do momentu daty zaciągu ... ściąga mi dane idealnie ... później zaczynają się schody i nie wiem co jest nie tak.... proszę o podpowiedzi
informację pobierane są ze strony http://worldoftanks.eu/community/accounts/...74822-majes_pl/