Results 1 to 2 of 2

Thread: mp3 search engine direct download how to put next and previous page

  1. #1
    Junior Member
    Join Date
    Jan 2010
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Default mp3 search engine direct download how to put previous link in the last page?

    this is the demo [Only registered and activated users can see links. Click Here To Register...]



    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>";
    
     }
    
    }
    
    
    
    
    ?>
    Last edited by yongskie; 25-02-10 at 18:45.

  2. #2
    Junior Member
    Join Date
    Jan 2010
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Default

    i already put the next and previous page but my problem is the previous link page in the last page.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Search.BollywoodJalwa.Com - Free Audio & Lyrics Search Engine
    By opticalpigion in forum Sites / Links
    Replies: 2
    Last Post: 10-02-10, 06:02
  2. New Working MP3 Search Engine With Direct Download
    By sanjaycity in forum Marketplace
    Replies: 7
    Last Post: 16-01-10, 11:09
  3. Help me about search engine
    By DiL in forum Coding Forum
    Replies: 10
    Last Post: 09-01-10, 12:52
  4. moozzl.com like - mp3 search engine
    By GumSlone in forum Scripts Forum
    Replies: 67
    Last Post: 05-12-09, 12:43
  5. Direct Download World
    By wadibahi in forum Sites / Links
    Replies: 0
    Last Post: 16-07-09, 04:33

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

SEO by vBSEO

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19