Cytat(aras785 @ 1.07.2014, 20:24:27 )

<?php
include('simple_html_dom.php');
$html = '<img title="Hot babysitter Melanie Rios" id="0622953" class="te lazy" data-src="http://img.l3.cdn.redtubefiles.com/_thumbs/0000622/0622953/0622953_009m.jpg" src="http://img01.redtubefiles.com/_thumbs/design/new-design/video-thumb-placeholder.gif" alt="Hot babysitter Melanie Rios" />';
Nie bardzo rozumie, jak to się ma do wszystkich miniatur filmików? ja podałem tylko przykład a reszte jak zrobic?

tutaj pełna klasa:
// Get Videos from RedTube.com ------------------------------
case 'redtube.com':
$page_number = 1;
do {
if ($page_number > $maxpages+1) {break;}
if (($page_number > "1") AND ($showoutput == "yes")) {
if ($grab_next_page) {$url = $grab_next_page;}
$show_total_source++;
if ($showoutput == "yes") {
echo "<p align=\"left\"><i><b>[".$show_total_source."] Connecting ".$showfeedhost." page ".$page_number."...</b></i> [<a href=\"".$url."\" target=\"_blank\" title=\"Go to ".$url."\">Check Link</a>]<br></p>"; flush_buffers();
}
}
$curlresult = connectSource($url, $userAgent, $usefollow, $proxies, $proxysources, $feedhost, $family_filter);
if (!$curlresult) {$feednotfound++; $notfoundstats[] = $url; break;}
$html= str_get_html($curlresult);
$grab_urls = $html->find('a[class=s]');
$grab_infos = $html->find('img[class=te]');
$grab_vidtime = $html->find('span[class=d]');
$find_next = preg_match("/a id = \"navNext\" title = \"(.*)\" class = \"navigate\" href = \"(.*)\" onclick/Ui", $html, $next_page); $grab_next = $next_page[2];
if ($grab_next) {$grab_next_page = $grab_next;} else {unset($grab_next_page);} $futuretime = 5; $pornmax = 1; $conta = 0; $grabbed_cp = 0;
foreach ($grab_infos as $element) {
if($pornmax > $maxvideos) {break;} else {
$title = fixEncoding($element->title);
$checklink = sanitize_title($title);
$cl2 = $wpdb->get_var("SELECT post_name FROM $wpdb->posts WHERE post_name = '$checklink'");
if ($cl2) {$conta++; continue;}
$thumbnail = $element->src;
$vidcod = $element->id;
if (!$vidcod) {$conta++; continue;}
$checkcod = $wpdb->get_var("SELECT meta_value FROM $wpdb->postmeta WHERE meta_key= 'mvb_vid_code' AND meta_value = '$vidcod'");
if ($checkcod) {$conta++; continue;}
$description = "";
$keywords = fixpornkeywords($keywords);
$keywords = fixEncoding($keywords);
if ($checktitle == "yes") {if (search_blocked_tags
(strtolower($title), $blocktags)) {$conta++; continue
;}} if ($checkdesc == "yes"){if (search_blocked_tags
(strtolower($description), $blocktags)) {$conta++; continue
;}} if ($checktags == "yes"){if (search_blocked_tags
(strtolower($keywords), $blocktags)) {$conta++; continue
;}} $postcontent = player_redtube($vidcod,$pwsize,$phsize);
$redtube++;
$mvbstats['RedTube'] = $redtube;
$vidurl_original = $grab_urls[$conta]->href;
$vidurl_original = "http://www.redtube.com".$vidurl_original."";
}
$vidtime = $grab_vidtime[$conta]->plaintext;
savepost($category, $keywords, $thumbnail, $description, $postcontent, $poststatus, $title, $commentstatus, $pingstatus, $feedhost, $vidcod, $postauthor, $futuretime, $vidurl_original, $grab_comments, $max_comments, $aprove_comments, $vidtime);
$pornmax++; $conta++; $ptotaladded++; $grabbed++; $grabbed_cp++; $futuretime = $futuretime + $scheduletime;
if ($showoutput == "yes") {
echo "<p align=\"left\"><i><font color=\"green\">Video added:</font> ".$title." <font color=\"green\">(".$poststatus.")</font></i><br></p>"; flush_buffers();
}
$grab_more = $maxvideos-$grabbed;
if ($grab_more == "0") {break;}
}
}
$html->clear();
if (($grabbed_cp == "0") AND
($showoutput == "yes")) { echo "<p align=\"left\"><i>There is no new videos in this page.</i><br></p>"; flush_buffers
();} $page_number++;
if (!$grab_next_page) {break;}
} while (($grab_more > "0") OR ($grabbed == "0"));
break;