Hello & Welcome to our community. Is this your first visit? Register

Page 1 of 2 12 LastLast
Results 1 to 15 of 25
  1. #1
    Fuck you, I'm a dragon Pieman's Avatar

    Rank
    The Omega
    Join Date
    Apr 2005
    Location
    The Netherlands
    Posts
    7,582

    [PHP/OOP] 4chan image downloader V2 !UPDATED!

    This is the next version of [Only registered and activated users can see links. ] I've added a gallery which let's you select which images you want to download. So you don't accidentally download 20 furry porn wallpapers to your server.

    Requirements:

    • PHP 4.0 or higher (5.0 or higher recommended)
    • A web server which let's you edit ini settings.


    Screenshots:



    How to use:

    Put the script anywhere on your web server, call it "4chan_images.php" then create a directory called "images" (This can be changed). Then run the script and everything should be self-explanatory.

    Script:

    PHP Code:
    <?php
    error_reporting
    (0);

    class 
    image_downloader 

        public 
    $url;
        
        protected function 
    get_source() {
        
            if((
    $source = @file_get_contents($this->url)) == false) {
            
                die(
    "Could not open thread.");
            
            }
        
            return 
    $source;
        }
        
        protected function 
    get_file_link() {
        
            
    $source $this->get_source();
            
    $i 0;  
                
            
    preg_match_all("/\"\>File(.*?)\<blockquote\>/is"$source$matches_image);
            
            while(
    $i count($matches_image[1])) {
            
                
    preg_match("/\<a href\=\\\"(.*?)\\\" target\=/is"$matches_image[0][$i], $images_array[$i]);
                        
                
    $i ++;
                
            }
                        
            return 
    $images_array;
                    
        }
        
        public function 
    get_images() {
        
            
    $a_images $_POST['amount'];
            
    $i 0;
            
            while(
    $i $a_images) { 
            
                if(isset(
    $_POST["image_$i"])) {
                
                    
    $images_array[$i] .= $_POST["image_$i"];
                }
                
                
    $i ++;
                
            }
            
            return 
    $images_array;
            
        }
        
        public function 
    save_file() {
        
            
    $images_array $this->get_images();
            
    $i 0;
            
    $errors 0;
            
    $file "";
            
            while(
    $i count($images_array)) {
            
                
    $extension preg_replace("/.*\./is"""$images_array[$i]);
        
                if((
    $handle_external = @fopen($images_array[$i], "r"))) {
                
                    while(
    $line fread($handle_external8192)) {
                    
                        
    $file .= $line;
                        
                    }
                    
    //Change the directory between quotes to change the directory the images will be downloaded to.
                    
    while(($handle_internal fopen("images/".rand(0,9999999999999).".$extension""x+"))== false)
                    
                    
    fclose($handle_external);
                    
    fwrite($handle_internal$file);
                    
    fclose($handle_internal);
                    unset(
    $handle_external$line$file$handle_internal);
                    
                } else {
                
                    
    $errors ++;
                    
                }
                
                
    $i ++;
                
            }
                
            echo 
    $errors " image(s) not saved.<br/><br/><a href='".$_SERVER['PHP_SELF']."'>&lt;&lt;back</a>";
            
        }                
    }
    class 
    display_images extends image_downloader {

        public 
    $url;

        private function 
    get_thumbs() {
        
            
    $source $this->get_source();
            
    $i 0;  
                
            
    preg_match_all("/\"\>File(.*?)\<blockquote\>/is"$source$matches_image);
            
            while(
    $i count($matches_image[1])) {
            
                
    preg_match("/img src=([a-z0-9:\/\.]*)/is"$matches_image[1][$i], $thumbs_array[$i]);
                        
                
    $i ++;
                
            }
            
            return 
    $thumbs_array;
                    
        }
        
        public function 
    d_img_form() {
        
            
    $thumbs_array $this->get_thumbs();
            
    $images_array $this->get_file_link();
            
    $i 0;
            
    $thumbs "";
            
            echo 
    '<form name="image_form" method="post" action="4chan_images.php">';
            echo 
    "\n";
            echo 
    '<table cellspacing ="5" border ="0" align="center">';
            echo 
    "\n";
            
            while(
    $i count($thumbs_array)) {
            
                if(
    $i == 0) {
                
                    
    $thumbs .= "<td><div style='width:130px; height:130px; background-color:#000000;' align='center'><input type='checkbox' checked='checked' name='image_$i' value='".$images_array[$i][1]."' style='float:right;'/><a href='".$images_array[$i][1]."' target='_blank'><img src='".$thumbs_array[$i][1]."' alt='Thumbnail $i' height='100px' width='126px' border='0'/></a></div></td>\n";
                } else {    
            
                    
    $thumbs .= "<td><div style='width:130px; height:130px; background-color:#000000;' align='center'><input type='checkbox' checked='checked' name='image_$i' value='".$images_array[$i][1]."' style='float:right;'/><a href='".$images_array[$i][1]."' target='_blank'><img src='".$thumbs_array[$i][1]."' alt='Thumbnail $i' style='max-height:115px;' border='0'/></a></div></td>\n";
                            
                    if(((
    $i+1) % $_POST['images_row'] == 0) || (count($thumbs_array) - $i == 1)) {
                        
                        echo 
    "<tr>\n";
                        echo 
    $thumbs;
                        echo 
    "</tr>\n";
                                    
                        
    $thumbs "";
                    }
                }
                
    $i ++;
            }
            
            echo 
    "</table>";
            echo 
    "<input type='hidden' name='amount' value='".count($thumbs_array)."'/>";
            echo 
    "\n <br/> \n";
            echo 
    '<div align="center"><input type="submit" name="download" value="download"/></div>';
            echo 
    '</form>';
                
        }
    }        
        
    set_time_limit(0);
    ini_set("max_execution_time""0");

    if(!isset(
    $_POST['get_thread']) && !isset($_POST['download'])) {

        
    ?>
        <form method="post" action="">
        Link to thread:<br/>
        <input type="text" size="55" name="link" />
        <br/>
        Amount of images per row
        <select name="images_row">
        <option value="10">10</option>
        <option value="9">9</option>
        <option value="8">8</option>
        <option value="7">7</option>
        <option value="6">6</option>
        <option value="5">5</option>
        <option value="4">4</option>
        <option value="3">3</option>
        <option value="2">2</option>
        <option value="1">1</option>
        </select>
        <br/>
        <input type="submit" value="submit" name="get_thread" />
        </form>
        <?php
        
    } else if(!isset($_POST['download'])) {

        
    $display = new display_images();
        
    $display -> url $_POST['link'];
        
    $display -> d_img_form(); 
        
    } else {

        
    $downloader = new image_downloader();
        
    $downloader -> save_file(); 

    }
    ?>
    If you encounter any bugs, please post them here and I'll try to fix them.

    10-10-09: Updated the script, it now works again with all boards. It now also downloads the first image of every thread. Something the previous script didn't. Sorry it took so long.
    Attached Images Attached Images
    Last edited by Pieman; 16-10-09 at 09:37 AM.
    TO ALL SEXY MEN SENDING ME FRIEND REQUESTS: I DO WANT TO KNOW YOU AND I WANT TO BE YOUR FRIEND. FUCK ME.

  2. # ADS
    HyperFilter
    RaGEZONE Sponsor

    Rank
      Sponsor  
    Join Date
    Sep 2013
    Posts
    9000


     

  3. #2
    #teamroxbury Cask's Avatar

    Rank
    True Member
    Join Date
    Jul 2007
    Posts
    890

    Re: [PHP/OOP] 4chan image downloader V2

    Thank you, kind sir!

  4. #3
    :)

    Rank
    Alpha Male
    Join Date
    Jan 2009
    Location
    Illinois, U.S.
    Posts
    2,408

    Re: [PHP/OOP] 4chan image downloader V2

    Yay. Now I can has my CP without going to 4chan!

  5. #4
    fight teh power RastaLulz's Avatar

    Rank
    Gamma
    Join Date
    Dec 2007
    Location
    Earth
    Posts
    3,425

    Re: [PHP/OOP] 4chan image downloader V2

    EDIT:
    I get this error (cut most of it out, as it just keeps going):
    Spoiler:

    Warning: fopen([Only registered and activated users can see links. ]) [function.fopen]: failed to open stream: HTTP wrapper does not support writeable connections in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 74

    Warning: fopen([Only registered and activated users can see links. ]) [function.fopen]: failed to open stream: HTTP wrapper does not support writeable connections in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 74

    Warning: fclose(): 2 is not a valid stream resource in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 76

    Warning: fopen([Only registered and activated users can see links. ]) [function.fopen]: failed to open stream: HTTP wrapper does not support writeable connections in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 74

    Warning: fclose(): 2 is not a valid stream resource in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 76

    Warning: fopen([Only registered and activated users can see links. ]) [function.fopen]: failed to open stream: HTTP wrapper does not support writeable connections in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 74

    Warning: fclose(): 2 is not a valid stream resource in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 76

    Warning: fopen([Only registered and activated users can see links. ]) [function.fopen]: failed to open stream: HTTP wrapper does not support writeable connections in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 74

    Warning: fclose(): 2 is not a valid stream resource in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 76

    Warning: fopen([Only registered and activated users can see links. ]) [function.fopen]: failed to open stream: HTTP wrapper does not support writeable connections in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 74

    Warning: fclose(): 2 is not a valid stream resource in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 76

    Warning: fopen([Only registered and activated users can see links. ]) [function.fopen]: failed to open stream: HTTP wrapper does not support writeable connections in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 74

    Warning: fclose(): 2 is not a valid stream resource in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 76

    Warning: fopen([Only registered and activated users can see links. ]) [function.fopen]: failed to open stream: HTTP wrapper does not support writeable connections in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 74

    Warning: fclose(): 2 is not a valid stream resource in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 76

    Warning: fopen([Only registered and activated users can see links. ]) [function.fopen]: failed to open stream: HTTP wrapper does not support writeable connections in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 74

    Warning: fclose(): 2 is not a valid stream resource in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 76

    Warning: fopen([Only registered and activated users can see links. ]) [function.fopen]: failed to open stream: HTTP wrapper does not support writeable connections in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 74

    Warning: fclose(): 2 is not a valid stream resource in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 76

    Warning: fopen([Only registered and activated users can see links. ]) [function.fopen]: failed to open stream: HTTP wrapper does not support writeable connections in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 74

    Warning: fclose(): 2 is not a valid stream resource in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 76

    Warning: fopen([Only registered and activated users can see links. ]) [function.fopen]: failed to open stream: HTTP wrapper does not support writeable connections in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 74

    Warning: fclose(): 2 is not a valid stream resource in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 76

    Warning: fopen([Only registered and activated users can see links. ]) [function.fopen]: failed to open stream: HTTP wrapper does not support writeable connections in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 74

    Warning: fclose(): 2 is not a valid stream resource in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 76

    Warning: fopen([Only registered and activated users can see links. ]) [function.fopen]: failed to open stream: HTTP wrapper does not support writeable connections in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 74

    Warning: fclose(): 2 is not a valid stream resource in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 76

    Warning: fopen([Only registered and activated users can see links. ]) [function.fopen]: failed to open stream: HTTP wrapper does not support writeable connections in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 74

    Warning: fclose(): 2 is not a valid stream resource in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 76

    Warning: fopen([Only registered and activated users can see links. ]) [function.fopen]: failed to open stream: HTTP wrapper does not support writeable connections in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 74

    Warning: fclose(): 2 is not a valid stream resource in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 76

    Warning: fopen([Only registered and activated users can see links. ]) [function.fopen]: failed to open stream: HTTP wrapper does not support writeable connections in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 74

    Warning: fclose(): 2 is not a valid stream resource in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 76

    Warning: fopen([Only registered and activated users can see links. ]) [function.fopen]: failed to open stream: HTTP wrapper does not support writeable connections in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 74

    Warning: fclose(): 2 is not a valid stream resource in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 76

    Warning: fopen([Only registered and activated users can see links. ]) [function.fopen]: failed to open stream: HTTP wrapper does not support writeable connections in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 74

    Warning: fclose(): 2 is not a valid stream resource in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 76

    Warning: fopen([Only registered and activated users can see links. ]) [function.fopen]: failed to open stream: HTTP wrapper does not support writeable connections in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 74

    Warning: fclose(): 2 is not a valid stream resource in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 76

    Warning: fopen([Only registered and activated users can see links. ]) [function.fopen]: failed to open stream: HTTP wrapper does not support writeable connections in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 74

    Warning: fclose(): 2 is not a valid stream resource in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 76

    Warning: fopen([Only registered and activated users can see links. ]) [function.fopen]: failed to open stream: HTTP wrapper does not support writeable connections in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 74

    Warning: fclose(): 2 is not a valid stream resource in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 76

    Warning: fopen([Only registered and activated users can see links. ]) [function.fopen]: failed to open stream: HTTP wrapper does not support writeable connections in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 74

    Warning: fclose(): 2 is not a valid stream resource in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 76

    Warning: fopen([Only registered and activated users can see links. ]) [function.fopen]: failed to open stream: HTTP wrapper does not support writeable connections in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 74

    Warning: fclose(): 2 is not a valid stream resource in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 76

    Warning: fopen([Only registered and activated users can see links. ]) [function.fopen]: failed to open stream: HTTP wrapper does not support writeable connections in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 74

    Warning: fclose(): 2 is not a valid stream resource in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 76

    Warning: fopen([Only registered and activated users can see links. ]) [function.fopen]: failed to open stream: HTTP wrapper does not support writeable connections in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 74

    Warning: fclose(): 2 is not a valid stream resource in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 76

    Warning: fopen([Only registered and activated users can see links. ]) [function.fopen]: failed to open stream: HTTP wrapper does not support writeable connections in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 74

    Warning: fclose(): 2 is not a valid stream resource in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 76

    Warning: fopen([Only registered and activated users can see links. ]) [function.fopen]: failed to open stream: HTTP wrapper does not support writeable connections in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 74

    Warning: fclose(): 2 is not a valid stream resource in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 76

    Warning: fopen([Only registered and activated users can see links. ]) [function.fopen]: failed to open stream: HTTP wrapper does not support writeable connections in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 74

    Warning: fclose(): 2 is not a valid stream resource in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 76

    Warning: fopen([Only registered and activated users can see links. ]) [function.fopen]: failed to open stream: HTTP wrapper does not support writeable connections in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 74

    Warning: fclose(): 2 is not a valid stream resource in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 76

    Warning: fopen([Only registered and activated users can see links. ]) [function.fopen]: failed to open stream: HTTP wrapper does not support writeable connections in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 74

    Warning: fclose(): 2 is not a valid stream resource in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 76

    Warning: fopen([Only registered and activated users can see links. ]) [function.fopen]: failed to open stream: HTTP wrapper does not support writeable connections in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 74

    Warning: fclose(): 2 is not a valid stream resource in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 76

    Warning: fopen([Only registered and activated users can see links. ]) [function.fopen]: failed to open stream: HTTP wrapper does not support writeable connections in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 74

    Warning: fclose(): 2 is not a valid stream resource in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 76

    Warning: fopen([Only registered and activated users can see links. ]) [function.fopen]: failed to open stream: HTTP wrapper does not support writeable connections in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 74

    Warning: fclose(): 2 is not a valid stream resource in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 76

    Warning: fopen([Only registered and activated users can see links. ]) [function.fopen]: failed to open stream: HTTP wrapper does not support writeable connections in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 74

    Warning: fclose(): 2 is not a valid stream resource in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 76

    Warning: fopen([Only registered and activated users can see links. ]) [function.fopen]: failed to open stream: HTTP wrapper does not support writeable connections in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 74

    Warning: fclose(): 2 is not a valid stream resource in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 76

    Warning: fopen([Only registered and activated users can see links. ]) [function.fopen]: failed to open stream: HTTP wrapper does not support writeable connections in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 74

    Warning: fclose(): 2 is not a valid stream resource in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 76

    Warning: fopen([Only registered and activated users can see links. ]) [function.fopen]: failed to open stream: HTTP wrapper does not support writeable connections in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 74

    Warning: fclose(): 2 is not a valid stream resource in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 76

    Warning: fopen([Only registered and activated users can see links. ]) [function.fopen]: failed to open stream: HTTP wrapper does not support writeable connections in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 74

    Warning: fclose(): 2 is not a valid stream resource in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 76

    Warning: fopen([Only registered and activated users can see links. ]) [function.fopen]: failed to open stream: HTTP wrapper does not support writeable connections in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 74

    Warning: fclose(): 2 is not a valid stream resource in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 76

    Warning: fopen([Only registered and activated users can see links. ]) [function.fopen]: failed to open stream: HTTP wrapper does not support writeable connections in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 74

    Warning: fclose(): 2 is not a valid stream resource in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 76

    Warning: fopen([Only registered and activated users can see links. ]) [function.fopen]: failed to open stream: HTTP wrapper does not support writeable connections in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 74

    Warning: fclose(): 2 is not a valid stream resource in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 76

    Warning: fopen([Only registered and activated users can see links. ]) [function.fopen]: failed to open stream: HTTP wrapper does not support writeable connections in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 74

    Warning: fclose(): 2 is not a valid stream resource in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 76

    Warning: fopen([Only registered and activated users can see links. ]) [function.fopen]: failed to open stream: HTTP wrapper does not support writeable connections in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 74

    Warning: fclose(): 2 is not a valid stream resource in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 76

    Warning: fopen([Only registered and activated users can see links. ]) [function.fopen]: failed to open stream: HTTP wrapper does not support writeable connections in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 74

    Warning: fclose(): 2 is not a valid stream resource in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 76

    Warning: fopen([Only registered and activated users can see links. ]) [function.fopen]: failed to open stream: HTTP wrapper does not support writeable connections in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 74

    Warning: fclose(): 2 is not a valid stream resource in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 76

    Warning: fopen([Only registered and activated users can see links. ]) [function.fopen]: failed to open stream: HTTP wrapper does not support writeable connections in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 74

    Warning: fclose(): 2 is not a valid stream resource in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 76

    Warning: fopen([Only registered and activated users can see links. ]) [function.fopen]: failed to open stream: HTTP wrapper does not support writeable connections in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 74

    Warning: fclose(): 2 is not a valid stream resource in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 76

    Warning: fopen([Only registered and activated users can see links. ]) [function.fopen]: failed to open stream: HTTP wrapper does not support writeable connections in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 74

    Warning: fclose(): 2 is not a valid stream resource in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 76

    Warning: fopen([Only registered and activated users can see links. ]) [function.fopen]: failed to open stream: HTTP wrapper does not support writeable connections in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 74

    Warning: fclose(): 2 is not a valid stream resource in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 76

    Warning: fopen([Only registered and activated users can see links. ]) [function.fopen]: failed to open stream: HTTP wrapper does not support writeable connections in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 74

    Warning: fclose(): 2 is not a valid stream resource in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 76

    Warning: fopen([Only registered and activated users can see links. ]) [function.fopen]: failed to open stream: HTTP wrapper does not support writeable connections in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 74

    Warning: fclose(): 2 is not a valid stream resource in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 76

    Warning: fopen([Only registered and activated users can see links. ]) [function.fopen]: failed to open stream: HTTP wrapper does not support writeable connections in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 74

    Warning: fclose(): 2 is not a valid stream resource in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 76

    Warning: fopen([Only registered and activated users can see links. ]) [function.fopen]: failed to open stream: HTTP wrapper does not support writeable connections in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 74

    Warning: fclose(): 2 is not a valid stream resource in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 76

    Warning: fopen([Only registered and activated users can see links. ]) [function.fopen]: failed to open stream: HTTP wrapper does not support writeable connections in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 74

    Warning: fclose(): 2 is not a valid stream resource in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 76

    Warning: fopen([Only registered and activated users can see links. ]) [function.fopen]: failed to open stream: HTTP wrapper does not support writeable connections in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 74

    Warning: fclose(): 2 is not a valid stream resource in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 76

    Warning: fopen([Only registered and activated users can see links. ]) [function.fopen]: failed to open stream: HTTP wrapper does not support writeable connections in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 74

    Warning: fclose(): 2 is not a valid stream resource in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 76

    Warning: fopen([Only registered and activated users can see links. ]) [function.fopen]: failed to open stream: HTTP wrapper does not support writeable connections in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 74

    Warning: fclose(): 2 is not a valid stream resource in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 76

    Warning: fopen([Only registered and activated users can see links. ]) [function.fopen]: failed to open stream: HTTP wrapper does not support writeable connections in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 74

    Warning: fclose(): 2 is not a valid stream resource in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 76

    Warning: fopen([Only registered and activated users can see links. ]) [function.fopen]: failed to open stream: HTTP wrapper does not support writeable connections in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 74

    Warning: fclose(): 2 is not a valid stream resource in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 76

    Warning: fopen([Only registered and activated users can see links. ]) [function.fopen]: failed to open stream: HTTP wrapper does not support writeable connections in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 74

    Warning: fclose(): 2 is not a valid stream resource in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 76

    Warning: fopen([Only registered and activated users can see links. ]) [function.fopen]: failed to open stream: HTTP wrapper does not support writeable connections in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 74

    Warning: fclose(): 2 is not a valid stream resource in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 76

    Warning: fopen([Only registered and activated users can see links. ]) [function.fopen]: failed to open stream: HTTP wrapper does not support writeable connections in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 74

    Warning: fclose(): 2 is not a valid stream resource in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 76

    Warning: fopen([Only registered and activated users can see links. ]) [function.fopen]: failed to open stream: HTTP wrapper does not support writeable connections in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 74

    Warning: fclose(): 2 is not a valid stream resource in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 76

    Warning: fopen([Only registered and activated users can see links. ]) [function.fopen]: failed to open stream: HTTP wrapper does not support writeable connections in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 74

    Warning: fclose(): 2 is not a valid stream resource in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 76

    Warning: fopen([Only registered and activated users can see links. ]) [function.fopen]: failed to open stream: HTTP wrapper does not support writeable connections in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 74

    Warning: fclose(): 2 is not a valid stream resource in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 76

    Warning: fopen([Only registered and activated users can see links. ]) [function.fopen]: failed to open stream: HTTP wrapper does not support writeable connections in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 74

    Warning: fclose(): 2 is not a valid stream resource in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 76

    Warning: fopen([Only registered and activated users can see links. ]) [function.fopen]: failed to open stream: HTTP wrapper does not support writeable connections in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 74

    Warning: fclose(): 2 is not a valid stream resource in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 76

    Warning: fopen([Only registered and activated users can see links. ]) [function.fopen]: failed to open stream: HTTP wrapper does not support writeable connections in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 74

    Warning: fclose(): 2 is not a valid stream resource in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 76

    Warning: fopen([Only registered and activated users can see links. ]) [function.fopen]: failed to open stream: HTTP wrapper does not support writeable connections in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 74

    Warning: fclose(): 2 is not a valid stream resource in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 76

    Warning: fopen([Only registered and activated users can see links. ]) [function.fopen]: failed to open stream: HTTP wrapper does not support writeable connections in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 74

    Warning: fclose(): 2 is not a valid stream resource in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 76

    Warning: fopen([Only registered and activated users can see links. ]) [function.fopen]: failed to open stream: HTTP wrapper does not support writeable connections in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 74

    Warning: fclose(): 2 is not a valid stream resource in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 76

    Warning: fopen([Only registered and activated users can see links. ]) [function.fopen]: failed to open stream: HTTP wrapper does not support writeable connections in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 74

    Warning: fclose(): 2 is not a valid stream resource in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 76

    Warning: fopen([Only registered and activated users can see links. ]) [function.fopen]: failed to open stream: HTTP wrapper does not support writeable connections in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 74

    Warning: fclose(): 2 is not a valid stream resource in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 76

    Warning: fopen([Only registered and activated users can see links. ]) [function.fopen]: failed to open stream: HTTP wrapper does not support writeable connections in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 74

    Warning: fclose(): 2 is not a valid stream resource in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 76

    Warning: fopen([Only registered and activated users can see links. ]) [function.fopen]: failed to open stream: HTTP wrapper does not support writeable connections in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 74

    Warning: fclose(): 2 is not a valid stream resource in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 76

    Warning: fopen([Only registered and activated users can see links. ]) [function.fopen]: failed to open stream: HTTP wrapper does not support writeable connections in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 74

    Warning: fclose(): 2 is not a valid stream resource in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 76

    Warning: fopen([Only registered and activated users can see links. ]) [function.fopen]: failed to open stream: HTTP wrapper does not support writeable connections in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 74

    Warning: fclose(): 2 is not a valid stream resource in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 76

    Warning: fopen([Only registered and activated users can see links. ]) [function.fopen]: failed to open stream: HTTP wrapper does not support writeable connections in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 74

    Warning: fclose(): 2 is not a valid stream resource in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 76

    Warning: fopen([Only registered and activated users can see links. ]) [function.fopen]: failed to open stream: HTTP wrapper does not support writeable connections in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 74

    Warning: fclose(): 2 is not a valid stream resource in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 76

    Warning: fopen([Only registered and activated users can see links. ]) [function.fopen]: failed to open stream: HTTP wrapper does not support writeable connections in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 74

    Warning: fclose(): 2 is not a valid stream resource in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 76

    Warning: fopen([Only registered and activated users can see links. ]) [function.fopen]: failed to open stream: HTTP wrapper does not support writeable connections in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 74

    Warning: fclose(): 2 is not a valid stream resource in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 76

    Warning: fopen([Only registered and activated users can see links. ]) [function.fopen]: failed to open stream: HTTP wrapper does not support writeable connections in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 74

    Warning: fclose(): 2 is not a valid stream resource in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 76

    Warning: fopen([Only registered and activated users can see links. ]) [function.fopen]: failed to open stream: HTTP wrapper does not support writeable connections in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 74

    Warning: fclose(): 2 is not a valid stream resource in /home/rasta21/public_html/foskett.ws/4chan/4chan_images.php on line 76


    I've tried it on localhost, and my webhost, neither work.



    "In the end we're all just chalk lines on the concrete, drawn only to be washed away.
    For the time that I've been given, I am what I am."

  6. #5
    Account Upgraded | Title Enabled!

    Rank
    True Member
    Join Date
    Apr 2007
    Posts
    1,096

    Re: [PHP/OOP] 4chan image downloader V2

    It's very nice.

    I got the same error as you, Rasta. I can't remember exactly how I fixed it but it had something to do with PHP permissions... Either that or I installed another webserver software, WAMP that is.

  7. #6
    Fuck you, I'm a dragon Pieman's Avatar

    Rank
    The Omega
    Join Date
    Apr 2005
    Location
    The Netherlands
    Posts
    7,582

    Re: [PHP/OOP] 4chan image downloader V2

    Quote Originally Posted by Rasta View Post
    EDIT:
    I get this error (cut most of it out, as it just keeps going):

    I've tried it on localhost, and my webhost, neither work.
    It seems php can't open the folder where the images are saved in. Try to chmod the folder to 777. If that doesn't work change
    PHP Code:
    while(($handle_internal fopen("http://forum.ragezone.com/images/".rand(0000000000001,9999999999999).".$extension""x+"))== false
    on line 74 to
    PHP Code:
    while(($handle_internal fopen("".rand(0000000000001,9999999999999).".$extension""x+"))== false
    This will save all the images in the same folder as the script is located.

    As Mr. Lucifer said, it has to do something with permissions. I'm unsure how to fix it though, other than the methods I named above.
    TO ALL SEXY MEN SENDING ME FRIEND REQUESTS: I DO WANT TO KNOW YOU AND I WANT TO BE YOUR FRIEND. FUCK ME.

  8. #7
    fight teh power RastaLulz's Avatar

    Rank
    Gamma
    Join Date
    Dec 2007
    Location
    Earth
    Posts
    3,425

    Re: [PHP/OOP] 4chan image downloader V2

    Quote Originally Posted by Pieman View Post
    It seems php can't open the folder where the images are saved in. Try to chmod the folder to 777. If that doesn't work change
    PHP Code:
    while(($handle_internal fopen("http://forum.ragezone.com/images/".rand(0000000000001,9999999999999).".$extension""x+"))== false
    on line 74 to
    PHP Code:
    while(($handle_internal fopen("".rand(0000000000001,9999999999999).".$extension""x+"))== false
    This will save all the images in the same folder as the script is located.

    As Mr. Lucifer said, it has to do something with permissions. I'm unsure how to fix it though, other than the methods I named above.
    Thanks, it now works perfectly.

    Also, when I tried to chmod it to 777 yesterday, it gave me the 500 error.

    But anyways, that fix worked.



    "In the end we're all just chalk lines on the concrete, drawn only to be washed away.
    For the time that I've been given, I am what I am."

  9. #8
    Fuck you, I'm a dragon Pieman's Avatar

    Rank
    The Omega
    Join Date
    Apr 2005
    Location
    The Netherlands
    Posts
    7,582

    Re: [PHP/OOP] 4chan image downloader V2

    Quote Originally Posted by Rasta View Post
    Thanks, it now works perfectly.

    Also, when I tried to chmod it to 777 yesterday, it gave me the 500 error.

    But anyways, that fix worked.
    Glad to help
    TO ALL SEXY MEN SENDING ME FRIEND REQUESTS: I DO WANT TO KNOW YOU AND I WANT TO BE YOUR FRIEND. FUCK ME.

  10. #9
    Don't you mean Bizzarro! Ambrosiax's Avatar

    Rank
    True Member
    Join Date
    Apr 2008
    Posts
    1,349

    Re: [PHP/OOP] 4chan image downloader V2

    This is probably a small problem I keep getting.

    Code:
    Notice: Undefined variable: i in C:\wamp\www\IMAGES\4chan_images.php on line 23
    
    Notice: Undefined variable: images_array in C:\wamp\www\IMAGES\4chan_images.php on line 31
    0 image(s) not saved.
    Whats that mean?
    Theres no images? o.O

  11. #10
    Fuck you, I'm a dragon Pieman's Avatar

    Rank
    The Omega
    Join Date
    Apr 2005
    Location
    The Netherlands
    Posts
    7,582

    Re: [PHP/OOP] 4chan image downloader V2

    Quote Originally Posted by Ambrosiax View Post
    This is probably a small problem I keep getting.

    Code:
    Notice: Undefined variable: i in C:\wamp\www\IMAGES\4chan_images.php on line 23
    
    Notice: Undefined variable: images_array in C:\wamp\www\IMAGES\4chan_images.php on line 31
    0 image(s) not saved.
    Whats that mean?
    Theres no images? o.O
    It's just an empty variable. Just add error_reporting(1); add the top of the file and it should be fixed.

    Or better yet, add
    PHP Code:
     $i 0
    under
    PHP Code:
    $source $this->get_source(); 
    On line 19.
    TO ALL SEXY MEN SENDING ME FRIEND REQUESTS: I DO WANT TO KNOW YOU AND I WANT TO BE YOUR FRIEND. FUCK ME.

  12. #11
    2009 THE PINK IS IN! john_d's Avatar

    Rank
    Alpha Male
    Join Date
    Feb 2004
    Location
    Philippines
    Posts
    2,973

    Re: [PHP/OOP] 4chan image downloader V2

    im more interested in a CSS image downloader
    Dekaron UI v2 | Maple Portal | MUToolz Multi Server Edition | CabalToolz V4

    On Twitter "http://twitter.com/mmowebs"
    Portfolio: http://www.mmowebs.com/

  13. #12
    Fuck you, I'm a dragon Pieman's Avatar

    Rank
    The Omega
    Join Date
    Apr 2005
    Location
    The Netherlands
    Posts
    7,582

    Re: [PHP/OOP] 4chan image downloader V2

    Quote Originally Posted by john_d View Post
    im more interested in a CSS image downloader
    Like a script that downloads all images from a CSS file? That does sound useful indeed... Maybe an idea for my next project.
    TO ALL SEXY MEN SENDING ME FRIEND REQUESTS: I DO WANT TO KNOW YOU AND I WANT TO BE YOUR FRIEND. FUCK ME.

  14. #13
    :-) s-p-n's Avatar

    Rank
    Alpha Male
    Join Date
    Jun 2007
    Location
    Next Door
    Posts
    2,018

    Re: [PHP/OOP] 4chan image downloader V2

    Quote Originally Posted by Pieman View Post
    It seems php can't open the folder where the images are saved in. Try to chmod the folder to 777. If that doesn't work change
    PHP Code:
    while(($handle_internal fopen("http://forum.ragezone.com/images/".rand(0000000000001,9999999999999).".$extension""x+"))== false
    on line 74 to
    PHP Code:
    while(($handle_internal fopen("".rand(0000000000001,9999999999999).".$extension""x+"))== false
    This will save all the images in the same folder as the script is located.

    As Mr. Lucifer said, it has to do something with permissions. I'm unsure how to fix it though, other than the methods I named above.
    Actually it's because it says [Only registered and activated users can see links. ] instead of ./images.

    If you just replaced the [Only registered and activated users can see links. ] part with a [.] it should be fine.

    Ragezone glitch hurts sometimes

  15. #14
    Fuck you, I'm a dragon Pieman's Avatar

    Rank
    The Omega
    Join Date
    Apr 2005
    Location
    The Netherlands
    Posts
    7,582

    Re: [PHP/OOP] 4chan image downloader V2

    Quote Originally Posted by s-p-n View Post
    Actually it's because it says [Only registered and activated users can see links. ] instead of ./images.

    If you just replaced the [Only registered and activated users can see links. ] part with a [.] it should be fine.

    Ragezone glitch hurts sometimes
    That glitch is dreadfully annoying yes, though I believe the poster was aware of this.
    TO ALL SEXY MEN SENDING ME FRIEND REQUESTS: I DO WANT TO KNOW YOU AND I WANT TO BE YOUR FRIEND. FUCK ME.

  16. #15
    Isenheart . Leimone's Avatar

    Rank
    True Member
    Join Date
    Jul 2008
    Location
    Sweden, Stockholm.
    Posts
    1,358

    Re: [PHP/OOP] 4chan image downloader V2

    Goodjob, thanks.

 

 
Page 1 of 2 12 LastLast

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
  •  
HyperFilter
Sponsored by HyperFilter , secured by Incapsula , powered by LiteSpeed.
Mods by DBTech. All times are GMT +1. The time now is 07:38 AM.
Powered by vBulletin® Copyright , Jelsoft Enterprises Ltd.