Share New Modul Mp3 Search JCMS

279
.
Modul Preview in the Here

<?php
//Modul Created By AjiCMS.org

define('_IN_JOHNCMS', 1);
$headmod = "menu";
require('../incfiles/core.php');
$textl = 'Mp3 Search - AjieCMS.org';
require('../incfiles/head.php');
echo '<div class="phdr"><b><a href="/index.php">Home</a> | Mp3 Search</b></div>';
echo '<div class="maintxt">';
$id=$_GET['id']; $search=$_GET['search'];  $url='http://mp3skull.com/'.$_GET['id'].'';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, ''.$url.'');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_USERAGENT, $agent);
curl_setopt($ch,CURLOPT_COOKIESESSION,$cookie);
curl_setopt($ch,CURLOPT_COOKIEJAR,"cookies.txt");
curl_setopt($ch,CURLOPT_COOKIEFILE,"cookies.txt");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_REFERER, ''.$url.'');
curl_setopt($ch,CURLOPT_POST,true);
curl_setopt($ch,CURLOPT_TIMEOUT,200);
curl_setopt($ch,CURLOPT_POSTFIELDS,$postf);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Accept-Language: en-us,en;q=0.7,de-de;q=0.3','Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5'));
$content = curl_exec($ch);
$file=$content;
curl_close($ch);

$page=strip_tags($_GET['page']);
if(empty($page)){$page=1;} $per='6';
$item=($per*$page)-$per;

if($search and $page==1) { $search=str_replace(' ','_',$search); echo '<!-- Meta Refresh Tag --><meta http-equiv="refresh" content="0;url=?id=mp3/'.$search.'.html"/></head>';

echo '<div class="search">Search Mp3<form method="get" action="mp3_search.php"/><input type="text" name="search" value="'.$searchns.'"/><input type="submit" value="Cari Mp3"/></div>';
}

else { $name_exps=explode("/",$id);
$searchns=str_replace('.html','',$name_exps[count($name_exps)-1]);
$searchns=str_replace('_',' ',$searchns);

echo '</head><div class="search"><form method="get" action="mp3_search.php"/><input type="text" name="search" value="'.$searchns.'"/><input type="submit" value="Cari Mp3"/></div>'; }

if(!$id) { echo '<div class="phdr">Top Downloaded Files</div>'; }
else { $name_exp=explode("/",$id);
$searchn=str_replace('.html','',$name_exp[count($name_exp)-1]);
$searchn=str_replace('_',' ',$searchn); echo '<div class="phdr">'.$searchn.'</div>';  }

preg_match_all('~<div id="topright">(.*?)</div>~is',$file,$match,PREG_PATTERN_ORDER);

for($i=0;$i<=20;$i++) {

if(!empty($match[0][$i])) {
$match[0][$i]=str_replace("mp3/","menu/mp3_search.php?id=mp3/",$match[0][$i]);

echo '<div class="menu">'.$match[0][$i].'</div>'; } }
preg_match_all('~<div id="right_song">(.*?)Download</a>~is',$file,$matchs,PREG_PATTERN_ORDER);

$count=count($matchs[0])-1;
$yo=ceil($count/$per);
$dj=$item+$per;
for($i=$item;$i<$dj;$i++) {
if(!empty($matchs[0][$i])) {
$matchs[0][$i]=str_replace('<div id="right_song">','',$matchs[0][$i]);

$matchs[0][$i]=str_replace('<div style="font-size:15px;">','',$matchs[0][$i]);

$matchs[0][$i]=str_replace('<b>','',$matchs[0][$i]);

$matchs[0][$i]=str_replace('</b></div>','',$matchs[0][$i]);

$matchs[0][$i]=str_replace('<div style="clear:both;"></div>','',$matchs[0][$i]);

$matchs[0][$i]=str_replace('<div style="float:left;">','',$matchs[0][$i]);

$matchs[0][$i]=str_replace('<div style="float:left; height:27px; font-size:13px; padding-top:2px;">','',$matchs[0][$i]);

echo '<div class="menu">'.$matchs[0][$i].'</div>'; } }
$nextpage=$page+1;
$prevpage=$page-1;
if($yo >= $page){$next='<a href="mp3_search.php?id='.$id.'&page='.$nextpage.'">Next ></a>';} else{$next="Next >";}
$prevpage=$page-1;
if($yo >= $page){$next='<a href="mp3_search.php?id='.$id.'&page='.$nextpage.'">Next ></a>';} else{$next="Next >";}
$prevpage=$page-1;
if($yo >= $page){$next='<a href="mp3_search.php?id='.$id.'&page='.$nextpage.'">Next ></a>';} else{$next="Next >";}
$prevpage=$page-1;
if($yo >= $page){$next='<a href="mp3_search.php?id='.$id.'&page='.$nextpage.'">Next ></a>';} else{$next="Next >";}
if($page > 1){$prev='<a href="mp3_search.php?id='.$id.'&page='.$prevpage.'">< Prev</a>';} else{$prev="< Prev";}
if($yo >= $page) { echo '<div class="content" align="left">Page ('.$page.'/'.$yo.')<br/>';
echo '<a href="mp3_search.php?id='.$id.'&page=1"><< First</a> | '.$prev.' | '.$next.' | <a href="mp3_search.php?id='.$id.'&page='.$yo.'">Last >></a></div><div class="pages"><form method="get">Go to Page: <input type="hidden" name="id" value="'.$id.'"/><input type="text" name="page" value="'.$page.'" size="3"/><input type="submit" value="Go &#187;"/></form></div>'; }

echo '</div>';
require('../incfiles/end.php');
//By AjieCMS.org
?>
.
Thx, guy.
Всего: 2