Witam.

bawię się w pobieranie z redtube filmów.

oto kod:

  1. <?php
  2. $q=$_GET['q'];
  3. $q=str_replace(" ","+",$q);
  4. require_once "simple_html_dom.php";
  5.  
  6. $i=1;
  7. $html = file_get_html('http://www.redtube.com/new?search='.$q.'&page=' . $i);
  8.  
  9.  
  10. foreach($html->find('a[class=video-thumb]') as $element){
  11.  
  12. $q= $element->innertext;
  13. $vdgoc=$element->href;
  14. $vdgoc="http://www.redtube.com$vdgoc";
  15. $vdname=$element->title;
  16.  
  17.  
  18. if(preg_match('/data-src="(.+)" src="data/', $q, $matches)) $vdthumb= $matches[1];
  19. $timing=strip_tags($q);
  20. $timing = preg_replace('/\s+/', '', $timing);
  21. echo $vdthumb."<br/>";
  22. echo "<img src='$vdthumb' /><br/>
  23. <form action='addredtube.php' method='POST' target=_blank>
  24. Video name: <input type=text name='vdname' value='$vdname' /><br/>
  25. <input type=hidden name='vdthumb' value='$vdthumb' />
  26. <input type=hidden name='vdgoc' value='$vdgoc' />
  27. Description: <textarea name='vddesc' cols=40 rows=4>Watching porn video $vdname</textarea><br/>
  28. <input type=hidden name='timing' value='$timing' />
  29. $c
  30. <br/>
  31. <input type=\"submit\" value=\"Add this video\">
  32. </form>
  33. ";
  34. }
  35.  
  36.  



Problem pojawia się przy pobieraniu zdjęć. Połowa się nie wyświetla, a połowa jest ok..


Co może być nie tak w tym kodzie?