4shared soap api based grabber with search by extension !

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

    #16
    Originally posted by The Fox View Post
    I've noticed that the downloads do not work in some hostings and tell the truth I would not know why this happens because as you can see in the [DEMO] downloads work perfectly!


    PHP Code:
    <?php
    ######################
    ## forged on gowap.ro#
    ######################

    require_once'config.php';
    require_once
    'functions.php';

    $formeruri='http://www.4shared.com/mp3/'.$_GET['id'].'/'.$_GET['mod'].'.html';

    # get direct download link
    $client = new SoapClient("http://api.4shared.com/servlet/services/DesktopApp?wsdl");

    $dlid $client->getDirectLink(LOGIN,PASSWORD,$formeruri);
    $id $client->decodeLink(LOGIN,PASSWORD,$formeruri);
    $info $client->getFileInfo(LOGIN,PASSWORD,$id);

    $regx=array('|\[(.*?)]|i','|\((.*?)\)|i','|www(.*?)$|i');
         
    $nume_fisier=preg_replace($regx,'',utf8_format($info->name));

    /// check if 302 and switch $url to header location 
    /// otherwise use $dlid former url got from api
    $head array_change_key_case(get_headers($dlidTRUE));
    /// switch here
    if(!empty($head['location'])){$dlid=$head['location'];} 
    ## if the $url is file location we force to get 200 ok 
    ## the $url location from header must also return 200 ok
    $status=get_headers($dlid);

    echo 
    $status[0]."&nbsp;&nbsp;&nbsp;&nbsp;"

    if(
    $status[0]=="HTTP/1.1 200 OK") {

    echo
    '&nbsp;<a href="'.htmlspecialchars($dlid).'">'.$nume_fisier.' ['.format_bytes($info->size).'] </a><br/>';

    }

    /*
    ## we use else statement if header is not 200 ok 
    ## this works if they modify the header other than 302 or 200
    ## it will work fine but you will not be able to stop the user 
    ## for beeing redirected if the file doesn't exist anymore .

    ## uncomment if you want to use it !

    else {
    echo'&nbsp;<a href="'.htmlspecialchars($dlid).'">'.$nume_fisier.' ['.format_bytes($info->size).'] </a><br/>';
    }
    */

    ## comment this line if you want to use the upper one !
    else {
    echo
    "<h1>This file is not available !</h1>";
    }

    ?>
    Attached Files
    This is ten percent luck, twenty percent skill
    Fifteen percent concentrated power of will
    Five percent pleasure, fifty percent pain

    And a hundred percent reason to remember the name!

    Comment


      #17
      any idea why changing the code from

      Code:
      echo'&nbsp;<a href="'.htmlspecialchars($dlid).'">'.$nume_fisier.' ['.format_bytes($info->size).'] </a><br/>';
      to

      Code:
      header("Location: ".htmlspecialchars($dlid));
      doesn't work? It redirects to 4shared saying the url is invalid

      Comment


        #18
        Originally posted by belginfish View Post
        any idea why changing the code from

        Code:
        echo'&nbsp;<a href="'.htmlspecialchars($dlid).'">'.$nume_fisier.' ['.format_bytes($info->size).'] </a><br/>';
        to

        Code:
        header("Location: ".htmlspecialchars($dlid));
        doesn't work? It redirects to 4shared saying the url is invalid
        Have you tried:
        PHP Code:
        header("Location: ".$dlid); 

        Comment


          #19
          You could have skipped a dot lol header("Location: $dlid");
          Mobile chat, iphone chat, android chat, chat, rooms http://www.aiochat.com

          Comment


            #20
            I wroted this script as much easier to understand as i could ,
            as i posted before this require soap client installed on server side .

            This should be easy to read through even for a newbie.
            This is ten percent luck, twenty percent skill
            Fifteen percent concentrated power of will
            Five percent pleasure, fifty percent pain

            And a hundred percent reason to remember the name!

            Comment


              #21
              Originally posted by just_m3. View Post
              PHP Code:
              <?php
              ######################
              ## forged on gowap.ro#
              ######################

              require_once'config.php';
              require_once
              'functions.php';

              $formeruri='http://www.4shared.com/mp3/'.$_GET['id'].'/'.$_GET['mod'].'.html';

              # get direct download link
              $client = new SoapClient("http://api.4shared.com/servlet/services/DesktopApp?wsdl");

              $dlid $client->getDirectLink(LOGIN,PASSWORD,$formeruri);
              $id $client->decodeLink(LOGIN,PASSWORD,$formeruri);
              $info $client->getFileInfo(LOGIN,PASSWORD,$id);

              $regx=array('|\[(.*?)]|i','|\((.*?)\)|i','|www(.*?)$|i');
                   
              $nume_fisier=preg_replace($regx,'',utf8_format($info->name));

              /// check if 302 and switch $url to header location 
              /// otherwise use $dlid former url got from api
              $head array_change_key_case(get_headers($dlidTRUE));
              /// switch here
              if(!empty($head['location'])){$dlid=$head['location'];} 
              ## if the $url is file location we force to get 200 ok 
              ## the $url location from header must also return 200 ok
              $status=get_headers($dlid);

              echo 
              $status[0]."&nbsp;&nbsp;&nbsp;&nbsp;"

              if(
              $status[0]=="HTTP/1.1 200 OK") {

              echo
              '&nbsp;<a href="'.htmlspecialchars($dlid).'">'.$nume_fisier.' ['.format_bytes($info->size).'] </a><br/>';

              }

              /*
              ## we use else statement if header is not 200 ok 
              ## this works if they modify the header other than 302 or 200
              ## it will work fine but you will not be able to stop the user 
              ## for beeing redirected if the file doesn't exist anymore .

              ## uncomment if you want to use it !

              else {
              echo'&nbsp;<a href="'.htmlspecialchars($dlid).'">'.$nume_fisier.' ['.format_bytes($info->size).'] </a><br/>';
              }
              */

              ## comment this line if you want to use the upper one !
              else {
              echo
              "<h1>This file is not available !</h1>";
              }

              ?>
              thank this script work bro..

              Comment


                #22
                Originally posted by just_m3. View Post
                I wroted this script as much easier to understand as i could ,
                as i posted before this require soap client installed on server side .

                This should be easy to read through even for a newbie.
                thats why serious users get irritated.. coz they (newbies) ask for even DOTS anyways, coding-talk always rocks

                n you too man @ just_m3

                Comment


                  #23
                  nice work brother

                  good job brother

                  Comment


                    #24
                    Fisierul nu este disponibil reincarca pagina !

                    Fisierul nu este disponibil reincarca pagina !

                    Why this ? when trying to download a file ?

                    Comment


                      #25
                      Originally posted by shijilt1234 View Post
                      Fisierul nu este disponibil reincarca pagina !

                      Why this ? when trying to download a file ?
                      its work for me..
                      look Posted by just_m3.
                      you can try that script...

                      Comment


                        #26
                        download.php script does not work

                        download.php script does not work. share the finished bro
                        Last edited by yar; 25.11.13, 18:08.

                        Comment


                          #27
                          Originally posted by yar View Post
                          download.php script does not work

                          download.php script does not work. share the finished bro
                          scripts are given just_m3 still works well

                          PHP Code:
                          <?php 
                          ###################### 
                          ## forged on gowap.ro# 
                          ###################### 

                          require_once'config.php'
                          require_once
                          'functions.php'

                          $formeruri='http://www.4shared.com/mp3/'.$_GET['id'].'/'.$_GET['mod'].'.html'

                          # get direct download link 
                          $client = new SoapClient("http://api.4shared.com/servlet/services/DesktopApp?wsdl"); 

                          $dlid $client->getDirectLink(LOGIN,PASSWORD,$formeruri); 
                          $id $client->decodeLink(LOGIN,PASSWORD,$formeruri); 
                          $info $client->getFileInfo(LOGIN,PASSWORD,$id); 

                          $regx=array('|\[(.*?)]|i','|\((.*?)\)|i','|www(.*?)$|i'); 
                                
                          $nume_fisier=preg_replace($regx,'',utf8_format($info->name)); 

                          /// check if 302 and switch $url to header location  
                          /// otherwise use $dlid former url got from api 
                          $head array_change_key_case(get_headers($dlidTRUE)); 
                          /// switch here 
                          if(!empty($head['location'])){$dlid=$head['location'];}  
                          ## if the $url is file location we force to get 200 ok  
                          ## the $url location from header must also return 200 ok 
                          $status=get_headers($dlid); 

                          echo 
                          $status[0]."&nbsp;&nbsp;&nbsp;&nbsp;";  

                          if(
                          $status[0]=="HTTP/1.1 200 OK") { 

                          echo
                          '&nbsp;<a href="'.htmlspecialchars($dlid).'">'.$nume_fisier.' ['.format_bytes($info->size).'] </a><br/>'



                          /* 
                          ## we use else statement if header is not 200 ok  
                          ## this works if they modify the header other than 302 or 200 
                          ## it will work fine but you will not be able to stop the user  
                          ## for beeing redirected if the file doesn't exist anymore . 

                          ## uncomment if you want to use it ! 

                          else { 
                          echo'&nbsp;<a href="'.htmlspecialchars($dlid).'">'.$nume_fisier.' ['.format_bytes($info->size).'] </a><br/>'; 

                          */ 

                          ## comment this line if you want to use the upper one ! 
                          else { 
                          echo
                          "<h1>This file is not available !</h1>"


                          ?>
                          for demo: http://gruls.tk/dldl.php?id=h7ZMNvYB
                          masih bisa broooo...

                          Comment


                            #28
                            Just to let you know ...

                            It seems that 4shared is changing some things on their api ,
                            they are having major issues with "shared" files , and i think their api will require new settings such as an app id or something ,
                            there are too many grabbers based on the api they shared , also the new api url is pointing at
                            Code:
                            https://api.4shared.com/jax3/DesktopApp?wsdl
                            previous was
                            Code:
                            http://api.4shared.com/servlet/services/DesktopApp?wsdl
                            , we need to wait untill everything gets "finished" , you can change your api link to the new one .

                            I'm posting this because few days ago i saw some message complaining about the forbiden message which the api returns .
                            This is ten percent luck, twenty percent skill
                            Fifteen percent concentrated power of will
                            Five percent pleasure, fifty percent pain

                            And a hundred percent reason to remember the name!

                            Comment


                              #29
                              @just_m3: when "getDirectLink" function is used, this api only returns the normal link like this: http://www.4shared.com/(type)/(fileID)/(name).htm

                              Hopefully soon to work properly.

                              Comment


                                #30
                                If any one extract sid, dsid, tsid from file id then it may be work..

                                Comment

                                Working...
                                X