waptrick music search

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    waptrick music search

    Here's a waptrick/zamob music search script. I'm sure someone can make it better, please share back on upgrades/improvements MP3 search
    PHP Code:
    <?php
    if(isset($_GET['buffer'])){
        
    header('Content-Type:file; application/octet-stream; application/force-download');
        
    header('Content-Disposition:attachment; filename='.basename($_GET['buffer']));
        
    readfile('http://zamob.com/load-file'.$_GET['buffer']);
    }
    $page    = isset($_GET['pageid']) ? abs((int)$_GET['pageid']) : 1;
    echo    <<<HEAD
    <!DOCTYPE html>
    <html>
    <head><title>MP3 search</title>
    <style type="text/css">
    body{
        color:#FFF;
        background:#000;
        margin:auto;
    }
    #logo{
        background:#030;
        text-align:left;
        padding:5px;
    }
    a{
        color:#FFFF00;
        text-decoration:none;
        font-weight:bold;
    }
    </style>
    </head><body><div id="logo"><img src="
    {$_SERVER['HTTP_HOST']}" /></div>
    <form action="?c" method="get">

    Keyword: <br/><input class="search_sect" type="text" name="c" value=""/>

    <input type="hidden" name="check" value="0"/>  

    <input class="submit"  type="submit" value="Search" />      
    </form>
    HEAD;

    if(isset(
    $_GET['c'])){
        
    $url    'http://zamob.com/_common/search/search.jsp';
        
    $ch    curl_init();
        
    curl_setopt($chCURLOPT_URL$url.'?c='.urlencode($_GET['c']).'&check=0&type=full_mp3&pageid='.$page);
        
    curl_setopt($chCURLOPT_USERAGENT'BlackBerry');
        
    curl_setopt($chCURLOPT_RETURNTRANSFERtrue);
        
    $data    curl_exec($ch);
        
    curl_close($ch);
        
        
    preg_match_all('/\/download\/(.*)">(.*)<\/a>/i'$data$matches);
        if(
    count($matches[1])){
            for(
    $x 0count($matches[1]) > $x$x++) printf("<div>- <a href=\"?copy=%s\">%s</a></div>\n"$matches[1][$x], $matches[2][$x]);
        }else echo    
    '<br /><div style="color:#F00;font-weight:bold;">No results found for your search</div>';
        
        
    preg_match_all('/" title="(.*)"/i'$data$matches);
        if(
    count($matches[1])){
            echo    
    '<div style="background:#202020;padding:5px;">';
            for(
    $x 1count($matches[1]) > $x$x++){
                
    $s    preg_replace('/&pageid=([0-9]+)/i'''$_SERVER['QUERY_STRING']);
                
    printf("<a href=\"?%s&amp;pageid=%d\">%d</a> "$s$matches[1][$x], $matches[1][$x]);
            }echo    
    '</div>';
        }
    }

    else if(isset(
    $_GET['copy'])){
        
    $url    'http://zamob.com/download/'.str_replace('copy='''$_SERVER['QUERY_STRING']);
        
    $ch        curl_init();
        
    curl_setopt($chCURLOPT_URL$url);
        
    curl_setopt($chCURLOPT_USERAGENT'BlackBerry');
        
    curl_setopt($chCURLOPT_RETURNTRANSFERtrue);
        
    $data    curl_exec($ch);
        
    curl_close($ch);
        
    preg_match_all('/load-file(.*)">(.*)<\/a>/i'$data$matches);
        if(
    count($matches[1])){
            for(
    $x 0count($matches[1]) > $x$x++) printf("<div><a href=\"?buffer=%s\">%s</a></div>\n"$matches[1][$x], $matches[2][$x]);
        }
    }

    echo    <<<FOOT
    </body>
    </html>
    FOOT;
    ?>
    libra.wen.ru

    #2
    Parse error: syntax error, unexpected T_STRING in /home//public_html/34.php on line 7

    PHP Code:
    $page    = isset($_GET['pageid']) ? abs((int)$_GET['pageid']) : 1
    Getting this error

    Comment


      #3
      Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home//public_html/asd.php on line 40

      This is what is on line 40


      Line40: else if(isset($_GET['c'])){
      {
      $url = 'http://zamob.com/_common/search/search.jsp';
      $ch = curl_init();
      curl_setopt($ch, CURLOPT_URL, $url.'?c='.urlencode($_GET['c']).'&check=0&type=full_mp3&pageid='.$page);
      curl_setopt($ch, CURLOPT_USERAGENT, 'BlackBerry');
      curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
      $data = curl_exec($ch);
      curl_close($ch);

      preg_match_all('/\/download\/(.*)">(.*)<\/a>/i', $data, $matches);
      if(count($matches[1])){
      for($x = 0; count($matches[1]) > $x; $x++) printf("<div>- <a href=\"?copy=%s\">%s</a></div>\n", $matches[1][$x], $matches[2][$x]);
      }else echo '<br /><div style="color:#F00;font-weight:bold;">No results found for your search</div>';

      preg_match_all('/" title="(.*)"/i', $data, $matches);
      if(count($matches[1])){
      echo '<div style="background:#202020;padding:5px;">';
      for($x = 1; count($matches[1]) > $x; $x++){
      $s = preg_replace('/&pageid=([0-9]+)/i', '', $_SERVER['QUERY_STRING']);
      printf("<a href=\"?%s&amp;pageid=%d\">%d</a> ", $s, $matches[1][$x], $matches[1][$x]);
      }echo '</div>';
      }

      Comment


        #4
        Originally posted by brentg View Post
        Parse error: syntax error, unexpected T_STRING in /home//public_html/34.php on line 7

        PHP Code:
        $page    = isset($_GET['pageid']) ? abs((int)$_GET['pageid']) : 1
        Getting this error
        In my script that line isn't ended with a brace

        Added after 2 minutes:

        Originally posted by brentg View Post
        Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home//public_html/asd.php on line 40

        This is what is on line 40
        It's working on my server, both PHP 5.2 and 5.4 check whatever you edited
        Last edited by s3nzo; 05.04.13, 04:32.
        libra.wen.ru

        Comment


          #5
          Got the script working now but does not download

          Comment


            #6
            How can we include artist and genres instead of the just the search?

            Comment

            Working...
            X