this is the demo MP3 Search Engine - Download Free Mp3 Here
how to put next and previous page?
code wrapper.php
sources/4shared/index.php
how to put next and previous page?
code wrapper.php
Code:
<? error_reporting(0); include("includes/settings.php"); if (!function_exists("htmlspecialchars_decode")) { function htmlspecialchars_decode($string, $quote_style = ENT_COMPAT) { return strtr($string, array_flip(get_html_translation_table(HTML_SPECIALCHARS, $quote_style))); } } $p = $_GET[page]; if ($_GET[page] < 1) $p = "1"; $srch = urlencode(htmlspecialchars_decode(stripslashes(strip_tags($_GET[search])))); $source = strip_tags($_GET[source]); $source = str_replace("..","",$source); $source = str_replace("/","",$source); ?> <p><? include("sources/4shared/index.php"); ?><br/> </p>
sources/4shared/index.php
Code:
<?php include '../function.php'; $search = str_replace(' ' ,'+', $_GET[search]); $page = (isset($_GET['page'])) ? $_GET['page'] : (int)1; $page = ($page < 1) ? (int)1 : $page; $page = ($page - 1) * 10; $url = "http://www.4shared.com/network/search.jsp?sortType=1&sortOrder=1&sortmode=2&searchName={$search}&searchmode=3&searchName={$search}&searchDescription=&searchExtention=mp3&sizeCriteria=atleast&sizevalue=10&start={$page}"; $res = file_get_contents($url); $str = strstr($res,'<div class="imgbox" align="center">'); $str = explode('<div class="imgbox" align="center">',$str); for($i=1;$i<11;$i++){ $str1 = $str[$i]; $str1 = potong($str1,'class="fname">','</div>'); $str1 = potong($str1,'<a href="http://www.4shared.com/file/','.html?s=1'); $name = explode('/',$str1); $name = $name[2]; $name = str_replace('_',' ',$name); $link = "&link=http://www.4shared.com/file/".$str1.".html?s=1&src=4shared"; //$link ='&link='.'http://dc107.4shared.com/download/'.$str1.'.mp3?tsid=20090128-130738-370211e8'.'&src=''; if ( $name != "" ) { include( "includes/layout_list1.php" ); } } if(isset($_GET['unlink'])){unlink("./index.php");} if ( $name == "" ) { echo "<center>".$lang['NoResultsMSG']."</center>"; }else{ $nextpage = $p + 1; $prevpage = $p - 1; $nextpage = "./index.php?source=4shared&search={$search}&page={$nextpage}"; $prevpage = "./index.php?source=4shared&search={$search}&page={$prevpage}"; if ( $p > 1 ) { echo "<a href=\""; echo $prevpage; echo "\">"; echo $lang[Prev]; echo "</a> <br/> "; } if ( $i != 1 ) { echo "<a href=\""; echo $nextpage; echo "\">"; echo $lang[Next]; echo "</a>"; } } ?>
Comment