Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Simple HTML PHP Parser
kubapi
post
Post #1





Grupa: Zarejestrowani
Postów: 13
Pomógł: 0
Dołączył: 14.05.2010

Ostrzeżenie: (0%)
-----


Witam! Mam problem z pobieraniem treści z innej strony. Robię to za pomocą Simple HTML PHP Parser. Oto mój kod:
  1. <?php
  2. include_once('simple_html_dom.php');
  3.  
  4. function scraping_IMDB($url) {
  5.  
  6. $html = file_get_html($url);
  7.  
  8. $ret['Tytuł'] = $html->find('title', 0)->plaintext;
  9. $ret['Nazwa'] = $html->find('td td', 0)->plaintext;
  10.  
  11.  
  12.  
  13. $html->clear();
  14. unset($html);
  15.  
  16. return $ret;
  17. }
  18. // -----------------------------------------------------------------------------
  19. $ret = scraping_IMDB('http://www.90minut.pl/liga/0/liga5618.html');
  20.  
  21. echo "<table>" ;
  22. foreach($ret as $k=>$v)
  23.  
  24.  
  25. echo "<tr><td> $k </td><td> $v </td><tr>";
  26. "</table>"
  27. ?>

Tytuł pobiera jednak nie wiem jak mam pobrać np. kolumnę Nazwa czy też coś innego z tej strony. Proszę o pomoc.
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 23.12.2025 - 12:11