There are several sites running this type of interface where you select the "categories" you want and they just parse all the embeds in. You have no control over which videos atually get added since you select entire categories.
Here is an example of "how" this is done (this is for pornhub for all you pervs LOL) j/k
Code:
<html><head>
<title></title>
<link rel="stylesheet" type="text/css" href="style.css" />
<?
include ("../includes/yourdbconfigfile.php");
if(isset($_GET['search'])){
$search=$_GET['search'];
$search=str_replace(" ", "+",$search);
if(isset($_GET['page'])){
$param="action=webmasters%2Fembedded_videos_search&categories=0&duration=0&order_by=most_recent&search_keyword=$search&go=Go&page=$_GET[page]#";
}else{
$param="action=webmasters%2Fembedded_videos_search&categories=0&duration=0&order_by=most_recent&search_keyword=$search&go=Go";
}
//http://www.pornhub.com/main.php?action=webmasters/embedded_videos_search&categories=0&duration=0&order_by=most_recent&search_keyword=&go=Go&page=3#
//http://www.pornhub.com/main.php?action=webmasters/embedded_videos_search&categories=0&duration=0&order_by=most_recent&search_keyword=teen&go=Go&page=2#
$url="http://www.pornhub.com/main.php?$param";
//http://www.pornhub.com/main.php?action=webmasters%2Fembedded_videos_search&categories=0&duration=0&order_by=most_recent&search_keyword=teen&go=Go
// echo $url;
}else{
$url="http://www.pornhub.com/main.php?action=webmasters/embedded_videos_search";
//$search="sexy";
}
$handle = @fopen($url, "r");
if ($handle) {
while (!feof($handle)) {
$buffer = fgets($handle, 4096);
$f=$f.$buffer;
}
fclose($handle);
}
//echo $f;
preg_match_all("/vkey.{2,35}>/",$f, $vids, PREG_PATTERN_ORDER);
//echo "\n".$vids[0][0] . "
\n";
preg_match_all("/recent_image.{2,30}\"/",$f, $thumbs, PREG_PATTERN_ORDER);
preg_match_all("/jpg.{2,130}120\"/",$f, $titles, PREG_PATTERN_ORDER);
// echo $thumbs[0][0]. "
";
//echo $titles[0][0] . "
, ";
/*
vkey=401c33bfe808784842ef">
recent_image id="thumb_100192"
jpg" alt="Innocent Slow Handjob!" width="160" height="120"
*/
// class=t width=160 height=120 src='http://thumbs.redtube.com/_thumbs/0000011/0011194/0011194_006.jpg' onmouseout
// http://www.pornhub.com/video/000/100...umbs/small.jpg
echo "<table id='leftp' cellspacing='20'>";
echo "<tr><td align='center' colspan=2><form action='pornhub.php' method='get'><input type='text' name='search'><input type='submit' value='Search'></form></td></tr>";
for ($i = 0; $i <= 19; $i++) {
//echo "\n".$thumbs[0][$i]."
";
if($vids[0][$i]==""){
break;
}
$de=$i*2;
$vid=str_replace("vkey=", "",$vids[0][$de] );
$vid=str_replace("\">", "",$vid );
//echo $vid."
";
$tit=str_replace("jpg\" alt=\"", "",$titles[0][$i] );
$tit=str_replace("\" width=\"160\" height=\"120\"", "",$tit );
$thumbq=str_replace("recent_image id=\"thumb_", "",$thumbs[0][$i] );
$thumbq=str_replace("\"", "",$thumbq );
if(strlen($thumbq)==5){
$thumbq="0".$thumbq;
}
$thumbq1=substr($thumbq, 0, 3);
$thumbq2=substr($thumbq, 3, 3);
$fthumb="http://www.pornhub.com/video/000/".$thumbq1."/".$thumbq2."/thumbs/small.jpg";
$ts=$thumbq.".jpg";
$queryp=mysql_query("Select * from videos where thumb='$ts' ");
$rowpnum=mysql_num_rows($queryp);
echo mysql_error();
if($rowpnum==0){
$par=$par+1;
// if($par==2){
$par=0;
$esvi0=$vid;
$esti0=$tit;
$esth0=$fthumb;
echo "<tr><td align='center' colspan=2>$esti0
[img]$esth0[/img]</td></tr>\n";
//}//end if par
}//end if
}
if($_GET['page']>0){
$prev=$_GET['page']-1;
$next=$_GET['page']+1;
echo "<tr><td align='center'>Prev</td><td align='center'> Next</td></tr>";
}else{
echo "<tr><td colspan=2> Next</td></tr>";
}
echo "</table>";
?>
</body>
</html>
Bookmarks