Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > Coding Releases
You last visited: Today at 11:56

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Photobucket Crawler

Discussion on Photobucket Crawler within the Coding Releases forum part of the Coders Den category.

Reply
 
Old   #1
 
elite*gold: 3424
Join Date: May 2012
Posts: 31
Received Thanks: 23
Photobucket Crawler

Hallo liebe elitepvpers* Community,

nachdem ein Freund ein Photobucket Thumbnail Crawler gecodet hat, habe ich mir gedacht - ich machs nun auch für Fotos. Ihr müsst aber euch im Klaren sein, dass die Fotos abgespeichert werden.

Info: Manchmal kommt ein 400er Bad Request error weil wir zu schnell requesten.

Hier der Code:
PHP Code:
<?php
/*
 *Author: Finn // creative'Art
 *Date: 2012-10-04
*/

error_reporting(0);
class 
Photobucket {
    public function 
__construct() {
        echo 
">> Photobucket.com Imagecrawler \r\n";
        while(
true)
            
$this->crawler();
    }
    
    public function 
crawler() {
        
$source $this->request();
        
        
preg_match_all('#pbthumburl="(.*?)" #'$source$images);
        
        
$anzahl count($images[1]);
        
        echo 
">> $anzahl Bilder gefunden!\r\n";
        
        for(
$i 0$i $anzahl$i++) {
            
$imagename md5(rand(1,1000));
            
            
$url str_replace('th_'''$images[1][$i]);
            
            
$download file_get_contents($url);
            
$fileinfo pathinfo($images[1][$i]);
            
            if(
strlen($download) > 10) {                
                
file_put_contents('bilder/'.$imagename.'.'.$fileinfo['extension'], $download);
            }
            
            
sleep(2);
            
            echo 
">> $i / $anzahl gedownloadet! \r";
        }
        
        if(
$i == 20) {
            
//echo ">> Fertig...                   \r\n";
        
} else {
            echo 
">> Fehler beim Crawlen!\r\n";
        }
    }
    
    public function 
request() {
        
$ch curl_init();
        
        
curl_setopt($chCURLOPT_URL'http://photobucket.com/recent/images/');
        
curl_setopt($chCURLOPT_RETURNTRANSFERtrue);
        
curl_setopt($chCURLOPT_HEADERfalse);
        
        
$data curl_exec($ch);
        
curl_close($ch);
        
        return 
$data;
    }
}

$crawler = new Photobucket();
?>

Einfach hochladen und per php5 crawler.php starten (benötigt php5-cli bei Linux). Wenn ihr unter Windows seid, dann installiert euch PHP (windows.php.net) und erstellt euch eine start.bat mit dem Inhalt:


Code:
@echo off
php crawler.php
pause
Mit freundlichen Grüßen,
creαтιve'αrт
creαтιve'αrт is offline  
Reply


Similar Threads Similar Threads
10€ Photobucket-Gutschein nur 26 E*Gold!
05/11/2011 - elite*gold Trading - 2 Replies
Titel sagt Alles! Lg Schlumpf
Crawler deed exploit for Trollshaws
08/23/2007 - LotRO Exploits, Hacks, Tools & Macros - 1 Replies
Ok, so if you're level 50 like I am and are working on getting your deeds done, you will love this! The Determination Crawler Kill deed in Trollshaws really sucks! There are only about 7 that are up in the zone (night time about 9-10), so it takes FOREVER. So, I figured a way to speed things up a bit. If you haven't done "the riddle," quest out of Rivendale, you're in luck! Basically get the quest, and get to the part where you go to the cave and solve the final riddle. When you zone into the...



All times are GMT +1. The time now is 11:56.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.