Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Uzycie metody find z klasy Simple html DOM w petli foreach
Raven1122
post
Post #1





Grupa: Zarejestrowani
Postów: 369
Pomógł: 2
Dołączył: 1.11.2010

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


Witam, mam taki kod:


  1. <?php
  2. require_once("shd.php");
  3. $link = "http://www17.zippyshare.com/v/17073605/file.html";
  4. $html = file_get_html($link);
  5. foreach($html->find('font') as $element)
  6. echo $element->plaintext . '<br>';
  7.  
  8. ?>


No i chodzi o to, że wyciąga mi wszystkie elementy "font", a chciałbym się dowiedzieć jak wyciągnąć tylko te, które ja chcem. Zwraca mi:

  1. Remember Me |
  2. You have requested the file:
  3. Name:
  4. Flo Rida ft. Jennifer Lopez - Sweet Spot (TAITO Bootleg) www.StrefaMp3.eu.mp3
  5. Size:
  6. 10.51 MB
  7. Uploaded:
  8. 06-10-2012 09:37
  9. Last download:
  10. 18-03-2013 21:39
  11. Click the Play button to hear a sample of this MP3
  12. Advertisement
  13. Zippyshare.com News:
  14. To upload a file just follow these simple steps:
  15. Benefits of using Zippyshare:
  16. Zippyshare.com is completely free, reliable and popular way to store files online. We offer fast download speeds. The maximum filesize for a single file is 200 MB. The file can be downloaded at any time and as often as you need it. File Life: 30 days after no activity. No ridiculous queues! No limits!
  17. Report illegal files, please click here and send full link to us!
  18. Š 2006-2012 Zippyshare.com. All rights reserved.


A chce linie tylko: 3, 5, 7, 9


Jak zrobić by wyciągneło te linie??
Go to the top of the page
+Quote Post

Posty w temacie


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

 



RSS Aktualny czas: 20.08.2025 - 15:13