PHP SIMPLE DOM - div class -


please can me help?

$html = file_get_html('http://www.csfd.cz/hledat/?q=rychle+a+zb%c4%9bsile+2001'); 

this code:

<div id="search-films" class="ct-general th-1">     <h2 class="header">filmy</h2>     <div class="content">          <ul class="ui-image-list js-odd-even">             <li>                 <a href="/film/1616-rychle-a-zbesile/"><img src="//img.csfd.cz/files/images/film/posters/000/001/1619_405078.jpg?h180" alt="poster" class="film-poster-small image" /></a>                 <div>                     <h3 class="subject"><a href="/film/1616-rychle-a-zbesile/" class="film c1">rychle zběsile</a></h3>                        <p>akční / krimi, usa / německo, 2001</p>                     <p>                         režie: <a href="/tvurce/2850-rob-cohen/">rob cohen</a><br>                         hrají: <a href="/tvurce/2218-paul-walker/">paul walker</a>, <a href="/tvurce/129-vin-diesel/">vin diesel</a><br>                     </p>                     <div class="clear"></div>                 </div>             </li>         </ul> 

how this: img.csfd.cz/files/images/film/posters/000/001/1619_405078.jpg?h180 , /film/1616-rychle-a-zbesile/ ...? help

if want value of src using simple_html_dom can try following code:

1) html content:-

include("simple_html_dom.php"); // download https://sourceforge.net/projects/simplehtmldom/files/ $html = new simple_html_dom();    $html->load(your_html_content);  foreach($html->find('img') $a)     echo $a->src; 

2) url:-

include("simple_html_dom.php");  $html = file_get_html(your_url);  foreach($html->find('img') $a)     echo $a->src . '<br>'; 

Comments

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -