Ultimate fourshared leecher!

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

    #31
    dats cached result which is saving the resource & CPU usage, the cache is stored for 10000 secs by default & then again updated
    Bro can teach me how to add cache option in any simple grabber script ?

    Comment


      #32
      Originally posted by smart View Post
      Bro can teach me how to add cache option in any simple grabber script ?
      Hi bro, follow this,it's an easy thing...
      let's say you're trying to grab a webpage, w/ the below code

      PHP Code:
      $url "http://example.com";
      $file file_get_content($url);
      echo 
      $file//simple enough to understand 
      Now, if 10 users requests the above script url, let's say http://some.com/grab.php...the function file_get_contents will have fetch the same page 10 times,which is obviously wastage of resource & CPU.
      But you can make use of a cool php function ob_start(); which will start output buffering
      PHP Code:
      /*
      create a variable for the file dat will be used to show cached content
      */
      $cache_filename 'cache/'.md5($_SERVER['REQUEST_URI']);
      /*
      $_SERVER['REQUEST_URI'] will make an unique identity for each url w/ query strings
      i.e http://some.com/file.php?foo=bar&bar=foo
      */
      /*
      Let's make a function,to overcome repeating codes in every page
      */
      function load_cache($cache_time$cache_filename)
      {
      /*check if,the cache file already exists, & the filesize is more than the given value
      why filesize?
      Incase the function you're using to fetch the page(may be file_get_contents/cURL or something else) returns false(i.e the requested server is unresponsive),the cache file will remain blank,
      & if you dont use the filesize param, the blank page will be shown to the visitors...
      */
         
      if (file_exists($cache_filename) && filesize($cache_filename) > 10//
       
      {
      // the time the file was created
      $cache_created filemtime($cache_filename);
      }
         else
       {
      // if the file was not found
       
      $cache_created 0;
      }
         if ((
      time() - $cache_created) < $cache_time
       {  
          return 
      TRUE;
      }
      else
      {
          return 
      FALSE;
      }
      //now use the function

      if(load_cache(1000$cache_filename))
      {
      //the first param,i.e cache time,1000 here,cuz i wana update the cache every 1000 secs 
      //if it returns true,it'll mean the file exist, &  we can show it to the visitor
      require_once $cache_filename
      }
      else
      {

      $url "http://example.com";
      $file file_get_content($url);
      //start output_buffering, which will prevent outputting directly to the browser
      ob_start();
      echo 
      $file;
      /*
      //you can put anything here which you want to cache
      echo "blah blah";
      */
      $cached_content ob_get_contents(); // this will save the buffer in a variable,
      //if you don't understand,it's same like collecting rainwater in a tub :D
      //Now put the cached contents in a file which will be served to the next user,requesting the same URL
      file_put_contents($cache_filename$cached_content);
      //flush the current buffer output  , you may also use the buffer  dat you save i.e $cached_content
      ob_end_flush();

      Now w/o the comments,clean example
      PHP Code:


      $cache_filename 
      'cache/'.md5($_SERVER['REQUEST_URI']);

      if(
      load_cache(1000$cache_filename))
      {
      require_once 
      $cache_filename;
      }
      else
      {

      $url "http://example.com";
      $file file_get_content($url);
      ob_start();
      echo 
      $file;
      $cached_content ob_get_contents();
      file_put_contents($cache_filename$cached_content);
      ob_end_flush(); 
      dat's all..
      list of the functions used which will help you to understand better
      PHP: ob_start - Manual
      PHP: ob_end_flush - Manual
      PHP: ob_get_contents - Manual
      PS: i learnt it from someone's script when I used to be dead noob but modifed it later to make it work better...
      Last edited by softwarefreak; 07.03.12, 07:29.
      I need some facebook likes, can you please help me
      http://facebook.com/softwarefreakin
      I noticed social media is really powerful
      Well DONE is better than well SAID

      Comment


        #33
        Bro i got problem my dewplayer.swf wont show

        here : Www.demzx.Tk - Free search and download!
        Last edited by demzx; 07.03.12, 20:39.

        Comment


          #34
          Originally posted by demzx View Post
          Bro i got problem my dewplayer.swf wont show

          here : Www.demzx.Tk - Free search and download!
          403 Permission Denied try this an see what you've got ...

          403 Permission Denied


          i think they got file inclusion protection or something that don't allow http:// in url path mod the file and replace http:// from grabbed links and open it internal ...
          Last edited by just_m3.; 07.03.12, 21:56.
          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


            #35
            How do i need to fix the problem?? do i need to change anything in files?? yeah think it wus the http://

            when this :



            it showed.

            when this :

            403 Permission Denied

            it not showed.

            Comment


              #36
              Originally posted by demzx View Post
              How do i need to fix the problem?? do i need to change anything in files?? yeah think it wus the http://

              when this :



              it showed.

              when this :

              403 Permission Denied

              it not showed.
              Hi, but I can see that working

              Search results for - enrique

              I need some facebook likes, can you please help me
              http://facebook.com/softwarefreakin
              I noticed social media is really powerful
              Well DONE is better than well SAID

              Comment


                #37
                Originally posted by softwarefreak View Post
                Hi bro, follow this,it's an easy thing...
                let's say you're trying to grab a webpage, w/ the below code

                PHP Code:
                $url "http://example.com";
                $file file_get_content($url);
                echo 
                $file//simple enough to understand 
                Now, if 10 users requests the above script url, let's say http://some.com/grab.php...the function file_get_contents will have fetch the same page 10 times,which is obviously wastage of resource & CPU.
                But you can make use of a cool php function ob_start(); which will start output buffering
                PHP Code:
                /*
                create a variable for the file dat will be used to show cached content
                */
                $cache_filename 'cache/'.md5($_SERVER['REQUEST_URI']);
                /*
                $_SERVER['REQUEST_URI'] will make an unique identity for each url w/ query strings
                i.e http://some.com/file.php?foo=bar&bar=foo
                */
                /*
                Let's make a function,to overcome repeating codes in every page
                */
                function load_cache($cache_time$cache_filename)
                {
                /*check if,the cache file already exists, & the filesize is more than the given value
                why filesize?
                Incase the function you're using to fetch the page(may be file_get_contents/cURL or something else) returns false(i.e the requested server is unresponsive),the cache file will remain blank,
                & if you dont use the filesize param, the blank page will be shown to the visitors...
                */
                   
                if (file_exists($cache_filename) && filesize($cache_filename) > 10//
                 
                {
                // the time the file was created
                $cache_created filemtime($cache_filename);
                }
                   else
                 {
                // if the file was not found
                 
                $cache_created 0;
                }
                   if ((
                time() - $cache_created) < $cache_time
                 {  
                    return 
                TRUE;
                }
                else
                {
                    return 
                FALSE;
                }
                //now use the function

                if(load_cache(1000$cache_filename))
                {
                //the first param,i.e cache time,1000 here,cuz i wana update the cache every 1000 secs 
                //if it returns true,it'll mean the file exist, &  we can show it to the visitor
                require_once $cache_filename
                }
                else
                {

                $url "http://example.com";
                $file file_get_content($url);
                //start output_buffering, which will prevent outputting directly to the browser
                ob_start();
                echo 
                $file;
                /*
                //you can put anything here which you want to cache
                echo "blah blah";
                */
                $cached_content ob_get_contents(); // this will save the buffer in a variable,
                //if you don't understand,it's same like collecting rainwater in a tub :D
                //Now put the cached contents in a file which will be served to the next user,requesting the same URL
                file_put_contents($cache_filename$cached_content);
                //flush the current buffer output  , you may also use the buffer  dat you save i.e $cached_content
                ob_end_flush();

                Now w/o the comments,clean example
                PHP Code:


                $cache_filename 
                'cache/'.md5($_SERVER['REQUEST_URI']);

                if(
                load_cache(1000$cache_filename))
                {
                require_once 
                $cache_filename;
                }
                else
                {

                $url "http://example.com";
                $file file_get_content($url);
                ob_start();
                echo 
                $file;
                $cached_content ob_get_contents();
                file_put_contents($cache_filename$cached_content);
                ob_end_flush(); 
                dat's all..
                bro should i create cache folder in same grabber folder ?

                Comment


                  #38
                  @sofwarefreak,

                  Bro its via_google.php // not working on xml_api.php

                  Any idea anyone ??

                  Comment


                    #39
                    Originally posted by demzx View Post
                    @sofwarefreak,

                    Bro its via_google.php // not working on xml_api.php

                    Any idea anyone ??
                    hey, you've put some wrong codes in xmp_api.php cuz of which it's not working, if you don't kno wat you're doing w/ the script better leave it as it is...

                    Originally posted by smart View Post
                    bro should i create cache folder in same grabber folder ?
                    yes, create a dir name cache
                    I need some facebook likes, can you please help me
                    http://facebook.com/softwarefreakin
                    I noticed social media is really powerful
                    Well DONE is better than well SAID

                    Comment


                      #40
                      i wonder if the preview.pm3 will be replace of its original file name..

                      Comment


                        #41
                        Originally posted by Macneth View Post
                        i wonder if the preview.pm3 will be replace of its original file name..
                        You're joking? mp3 files are saved as original file names not preview.mp3, yeah there's an alternative download link which saves files as preview.mp3,you can remove it from flash.php
                        rihana - live your life.mp3 - free download!
                        Last edited by softwarefreak; 09.03.12, 11:32.
                        I need some facebook likes, can you please help me
                        http://facebook.com/softwarefreakin
                        I noticed social media is really powerful
                        Well DONE is better than well SAID

                        Comment


                          #42
                          Originally posted by softwarefreak View Post
                          You're joking? mp3 files are saved as original file names not preview.mp3, yeah there's an alternative download link which saves files as preview.mp3,you can remove it from flash.php
                          rihana - live your life.mp3 - free download!
                          its not like that...look at the picture the encircled one..when you clicked that one it saves as preview.mp3...ia there away to save it as original file name?
                          Last edited by Macneth; 10.03.12, 10:24.

                          Comment


                            #43
                            Originally posted by Macneth View Post
                            its not like that...look at the picture the encircled one..when you clicked that one it saves as preview.mp3...ia there away to save it as original file name?
                            Ok, I got you now I'll post a code dat will do it, But note dat it'll consume your bandwidth, so don't you think it's better to let users to download mp3's by going to the page initiate.php(original file names) or just preview.mp3 frm the results page

                            Added after 5 minutes:

                            Originally posted by Jishnutp
                            Hey bro in the picture and vid sections when we usemsearch it doesnt give thumnails but when using it from search it gives thumbs can you fix this my site Mr.Downloader - Free search and download!

                            Added after 6 minutes:

                            Here check an mp4 search Search results for - Rihanna

                            Forgot to say
                            My demo
                            Mr.Downloader - Free search and download!
                            Who has asked you to post your demo? I've already posted one!
                            & sorry no personal help for dem,who doesn't likes giving any credits to the script, use it if you want or else DONT! thank you
                            Last edited by softwarefreak; 10.03.12, 11:14.
                            I need some facebook likes, can you please help me
                            http://facebook.com/softwarefreakin
                            I noticed social media is really powerful
                            Well DONE is better than well SAID

                            Comment


                              #44
                              Originally posted by Macneth View Post
                              its not like that...look at the picture the encircled one..when you clicked that one it saves as preview.mp3...ia there away to save it as original file name?
                              Demo: KingPunjab.com - Music, wallpapers, games, themes, videos, songs and much much more...UNLIMITED Downloads

                              just replace your old flash.php code with this and its done....

                              PHP Code:
                              <?php
                              echo '<div style="display:inline;float:right;"><object type="application/x-shockwave-flash" data="/dewplayer.swf?mp3=preview.php?url='.$preview.'" width="200" height="18" id="dewplayer"><param name="wmode" value="transparent" /><param name="movie" value="/dewplayer-vol.swf?mp3=preview.php?url='.$preview.'" /></object>
                              <a href="/initiate.php?url='
                              .$link.'" title="Download Now"><img src="hide.png" /></a></div>';
                              ?>
                              Sandeep DiL (INDIAN)



                              Comment


                                #45
                                Owesome yaar !!! Working perfectly

                                Comment

                                Working...
                                X