Tube8 working grabber Mp4 02-12-2012

Started on the old forum in December 2012 · view the original in the archive · old links redirect here

2 replies · 1,637 views · started 14 years ago · 1 min read

2 participants
arnage Lead · 811 posts #2

🙂

<?php
error_reporting(0);

define('NL', PHP_EOL);

function capsfirst($input) {

	return mb_strtoupper(mb_substr($input, 0, 1, 'UTF-8'), 'UTF-8').mb_strtolower(mb_substr($input, 1, mb_strlen($input, 'UTF-8') - 1, 'UTF-8'), 'UTF-8');

}

function pick($start, $stop, $from) {

	$from = explode($start, $from);
	$from = explode($stop, $from[1]);
	$from = $from[0];
	return $from;

}

$sitehost = isset($_SERVER['HTTP_HOST']) ? htmlentities($_SERVER['HTTP_HOST'], ENT_QUOTES, 'UTF-8') : '';
$link = isset($_GET['link']) ? htmlentities($_GET['link'], ENT_QUOTES, 'UTF-8') : '';
$cat = isset($_GET['cat']) ? htmlentities($_GET['cat'], ENT_QUOTES, 'UTF-8') : '';

$sitename = mb_strtoupper($sitehost);

if (!empty($link)) {

	if (strpos($link, '/') !== false) {
	
		$title_link = explode('/', $link);
		$title_link = $title_link[0];
		$title = (mb_strlen($title_link, 'UTF-8') > 50 
		? capsfirst(str_replace('_', ' ', mb_substr($title_link, 0, 50, 'UTF-8').'...')) : capsfirst(str_replace('_', ' ', $title_link)));
		
	} else exit;

} elseif (!empty($cat)) {

	if (strpos($cat, '/') !== false) {
	
		$title_cat = explode('/', $cat);
		$title = capsfirst($title_cat[4]);
		
	} else exit;

} else {

	$title = 'Mobile Adult Videos';

}

echo '<?xml version="1.0" encoding="UTF-8"?>'.NL;
echo '<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">'.NL;
echo '<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >'.NL;
echo '<head>'.NL;
echo '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>'.NL;
echo '<title>'.$title.'</title>'.NL;
echo '<meta http-equiv="Cache-Control" content="no-cache"/>'.NL;
echo '<link rel="stylesheet" type="text/css" media="handheld, screen" href="./style.css"/>'.NL;
echo '<meta name="revisit-after" content="1 days"/>'.NL;
echo '<meta name="googlebot" content="index, follow"/>'.NL;
echo '<meta name="robots" content="index, follow, all"/>'.NL;
echo '<meta name="rating" content="general"/>'.NL;
echo '<meta name="description" content="Watch free hot videos for your mobile phone Iphone, Nokia, BlackBerry, Android, Samsung, Sony Ericsson, LG, Palm"/>'.NL;
echo '<meta name="keywords" content="video, sex, porn, mobile, 3gp, free, phone, iphone, tube, xxx, blackberry, '
	.'android, nokia, samsung, sony ericsson, indian, japanese, asian, teen, big, black, young, mature, milf"/>'.NL;
echo '<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;"/>'.NL;
echo '</head>'.NL;
echo '<body>'.NL;
echo '<div class="title">Sexy :)</div>'.NL;
echo (empty($cat) && empty($link) ? '<div class="ad1">WARNING - <span style="color:#CC0000;">ADULT CONTENT</span><br/>'
	.'<span style="color:#CC0000;font-size:x-small;">If you are under 18 years of age please leave now</span></div>' : '').NL;
echo '<div class="head"><b>'.$title.'</b></div>'.NL;

if (!empty($link)) {

	$file = file("http://m.tube8.com/video/show/title/$link");
	$link = @implode("", $file);

	$page = pick('<div id="main_scene_box">', '<div class="video_box_hub_page">', $link);
	$link2 = pick('href="http://cdn', '" class=', $page);
	$link2 = str_replace('&', '&', $link2);
	$img = pick(' style="background: url(', ') no', $page);
	$name = pick('alt="Play video ', '"', $page);
	echo '<div class="ad1">'.NL;
	echo '<a href="http://cdn'.$link2.'"><img src="'.$img.'" alt=""/></a><br/>'.$name.'<h4><a href="http://cdn'.$link2.'">Download</a></h4>'.NL;
	echo '</div>'.NL;

} elseif (!empty($cat)) {

	$file = file("http://m.tube8.com/$cat");
	$link = @implode("", $file);

	$page = pick('<center>', '<center>', $link);
	$next = pick('...', '...', $link);
	$next = str_replace(' <a href="', ' <a href="?cat=', $next);
	$next = str_replace(array('<span>', '</span>'), '', $next);

	$chunk = explode('<div class="scene_box">', $page);
	$count = count($chunk);
	for ($i = 1; $i < $count; $i++) {

		preg_match('/background: url\((.*)\) no-repeat/i', $chunk[$i], $img);
		preg_match('/Click to watch free video: (.*)" title/i', $chunk[$i], $name);
		preg_match('/<p>(.*)<\/p>/i', $chunk[$i], $detail);
		preg_match('/<p>Views:(.*)<\/p>/i', $chunk[$i], $views);
		preg_match('/<a href="\/video\/show\/title\/(.*)" class=/i', $chunk[$i], $link);

		echo '<div class="dl2"><table><tr><td>'.NL;
		echo '<img src="'.$img[1].'" alt="'.$name[1].'" width="95" height="95"/></td>'.NL;
		echo '<td><a href="?link='.$link[1].'"><strong> '.$name[1].'</strong></a><br/>'.NL;
		echo 'Upload time: '.$detail[1].'<br/>'.NL;
		echo 'Views: '.$views[1].'<br/>'.NL;
		echo '</td></tr></table></div>'.NL;

	}
	echo '<div style="text-align:center;"><b>'.$next.'</b></div>'.NL;

} else {

	echo '<div class="dl2"><img src="dir.png" alt=""/> <a href="?cat=/category/show/name/amateur">Amateur</a></div>'.NL;
	echo '<div class="dl"><img src="dir.png" alt=""/> <a href="?cat=/category/show/name/anal">Anal</a></div>'.NL;
	echo '<div class="dl2"><img src="dir.png" alt=""/> <a href="?cat=/category/show/name/asian">Asian</a></div>'.NL;
	echo '<div class="dl"><img src="dir.png" alt=""/> <a href="?cat=/category/show/name/blowjob">Blowjob</a></div>'.NL;
	echo '<div class="dl2"><img src="dir.png" alt=""/> <a href="?cat=/category/show/name/ebony">Ebony</a></div>'.NL;
	echo '<div class="dl"><img src="dir.png" alt=""/> <a href="?cat=/category/show/name/erotic">Erotic</a></div>'.NL;
	echo '<div class="dl2"><img src="dir.png" alt=""/> <a href="?cat=/category/show/name/fetish">Fetish</a></div>'.NL;
	echo '<div class="dl"><img src="dir.png" alt=""/> <a href="?cat=/category/show/name/hardcore">Hardcore</a></div>'.NL;
	echo '<div class="dl2"><img src="dir.png" alt=""/> <a href="?cat=/category/show/name/indian">Indian</a></div>'.NL;
	echo '<div class="dl"><img src="dir.png" alt=""/> <a href="?cat=/category/show/name/latina">Latina</a></div>'.NL;
	echo '<div class="dl2"><img src="dir.png" alt=""/> <a href="?cat=/category/show/name/lesbian">Lesbian</a></div>'.NL;
	echo '<div class="dl"><img src="dir.png" alt=""/> <a href="?cat=/category/show/name/mature">Mature</a></div>'.NL;
	echo '<div class="dl2"><img src="dir.png" alt=""/> <a href="?cat=/category/show/name/strip">Strip</a></div>'.NL;
	echo '<div class="dl"><img src="dir.png" alt=""/> <a href="?cat=/category/show/name/teen">Teen</a></div>'.NL;

}
echo (empty($cat) && empty($link) ? '' : '<div class="ad1"><a href="./">Home</a></div>').NL;
echo '<div class="footer">© '.$sitename.'</div>'.NL;
echo '</body>'.NL;
echo '</html>';

	exit;
?>
<!DOCTYPE html PUBLIC "-//***WAPFORUM**.**RS***
arnage Lead · 811 posts #3

When video title have three dots, next page links are screwed, pick it with span to avoid that.

$next = pick('<span>...</span>', '<span>...</span>', $link);
<!DOCTYPE html PUBLIC "-//***WAPFORUM**.**RS***

Write your reply now; next you create a free account (or sign in) and it is posted right away. Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close