• 27-07-2010, 23:50:07
    #1
    S.a Arkadaslar Dle konu botu buldum tr karekterde problem yaşıyorum düzeltemedim bir türlü Şimdiden teşekkürler yardımlarınız için.
    kodlarını vereyim


     <?php
    // óáğàë îáğåçêó è ñîîáùåíèå - kdiler.
    $debug = 1;
    error_reporting($debug ? E_ALL | E_STRICT : 0);
    define('MAX_ERRORS', 5);
    set_time_limit(0);
    @ini_set('max_execution_time', '0');
    @ini_set('display_errors', 'On');
    $rusWords = array(
    'pageNotLoaded' => "\xd1\xf2ğ\xe0í\xe8\xf6\xe0\x20\xed\xe5\x20ç\xe0ã\xf0\xf3\xe7èë\xe0ñü",
    'mysqlError' => "\xce\xf8\xe8áê\xe0 M\x79SQ\x4c\x2e",
    'convert' => array(
    'à' => 'a', 'á' => 'b', 'â' => 'v',
    'ã' => 'g', 'ä' => 'd', 'å' => 'e',
    '¸' => 'e', 'æ' => 'zh', 'ç' => 'z',
    'è' => 'i', 'é' => 'y', 'ê' => 'k',
    'ë' => 'l', 'ì' => 'm', 'í' => 'n',
    'î' => 'o', 'ï' => 'p', 'ğ' => 'r',
    'ñ' => 's', 'ò' => 't', 'ó' => 'u',
    'ô' => 'f', 'õ' => 'h', 'ö' => 'c',
    '÷' => 'ch', 'ø' => 'sh', 'ù' => 'sch',
    'ü' => '\'', 'û' => 'y', 'ú' => '\'',
    'ı' => 'e', 'ş' => 'yu', 'ÿ' => 'ya',
    'À' => 'A', 'Á' => 'B', 'Â' => 'V',
    'Ã' => 'G', 'Ä' => 'D', 'Å' => 'E',
    '¨' => 'E', 'Æ' => 'Zh', 'Ç' => 'Z',
    'È' => 'I', 'É' => 'Y', 'Ê' => 'K',
    'Ë' => 'L', 'Ì' => 'M', 'Í' => 'N',
    'Î' => 'O', 'Ï' => 'P', 'Ğ' => 'R',
    'Ñ' => 'S', 'Ò' => 'T', 'Ó' => 'U',
    'Ô' => 'F', 'Õ' => 'H', 'Ö' => 'C',
    '×' => 'Ch', 'Ø' => 'Sh', 'Ù' => 'Sch',
    'Ü' => '\'', 'Û' => 'Y', 'Ú' => '\'',
    'İ' => 'E', 'Ş' => 'Yu', 'ß' => 'Ya'
    ),
    'err' => "\xceø\xe8\xe1\xea\xe0",
    'stranitsa' => "\xd1\xf2\xf0\xe0\xed\xe8\xf6\xe0",
    'neZagruzhena' => "\xedå\x20\xe7\xe0\xe3\xf0ó\xe6åí\xe0",
    'notAnyOneLoaded' => 'Íè îäíîãî ïîñòà íå äîáàâëåíî. Âîçìîæíî ïğîáëåìà ñ çàãîëîâêàìè íîâîñòåé.',
    'admin' => "Àäìèí"
    );
    require 'classes/mysql.php';
    class db {}
    require '../engine/data/dbconfig.php';
    ${'mysql'} = new MySQL(array(
    'host' => DBHOST,
    'login' => DBUSER,
    'password' => DBPASS,
    'name' => DBNAME
    ));
    ${'mysql'}->debugMode = $debug;
    ${'mysql'}->logFile = 'mysql_log.html';
    ${'mysql'}->errorMessage = $rusWords['mysqlError'];
    ${'mysql'}->magicQuotes = FALSE;
    require 'login.php';
    unset(${'mysql'});
    require 'classes/grab.php';
    require 'classes/sockets.php';
    $url = @$_GET['url'];
    $urlParsed = parse_url($url);
    $donorHost = $urlParsed['host'];
    $categories = @$_GET['cats'];
    $downloadImages = @$_GET['downloadImg'];
    $layOnWatermark = @$_GET['watermark'];
    $downAttachments = @$_GET['downloadAttaches'];
    $toModerate = @$_GET['moderate'];
    $setTimeout = @$_GET['delay'];
    $synonimizeTitle = @$_GET['synTitle'];
    $synonimizeShort = @$_GET['synShort'];
    $synonimizeFull = @$_GET['synFull'];
    $downloadVideo = @$_GET['downloadVideo'];
    $verifyUnique = @$_GET['isExist'];
    $allowMain = @$_GET['notMain'];
    $downloadAudio = @$_GET['downloadAudio'];
    $getKeyWords = @$_GET['getTags'];
    $concatShort = @$_GET['concatenate'];
    $minWidth = @$_GET['resizeImg'] ? @$_GET['maxWidth'] : 3000;
    if($minWidth < 0) $minWidth = 0;
    $postAuthor = explode(',', @iconv('utf-8', 'windows-1251', @$_GET['author']));
    $login = @iconv('utf-8', 'windows-1251', @$_GET['login']);
    $password = @iconv('utf-8', 'windows-1251', @$_GET['pass']);
    class DOMDoc extends DOMDocument {
    public function innerHTML($el){
    $inner = $this->saveXML($el);
    preg_match('|^\<.+?\>(.+)\</.+?\>$|su', $inner, $inner);
    return str_replace(' ', '', @iconv('utf-8', 'windows-1251//IGNORE', $inner[1]));
    }
    public function findLink($links, $id){
    $i = 0;
    foreach($links as $link){
    if(strpos($links->item($i)->getAttribute('href'), '/'.$id.'-') !== FALSE) return $links->item($i);
    $i++;
    }
    return NULL;
    }
    public function getByName($name){
    $keyWords = $this->getElementsByTagName('meta');
    $i = 0;
    foreach($keyWords as $p){
    if($keyWords->item($i)->getAttribute('name') == $name) return $keyWords->item($i);
    $i++;
    }
    return NULL;
    }
    }
    $grab = new Grab;
    $full = FALSE;
    $sock = Sockets("\x68\x74\x74\x70\x3a\x2f\x2fs\x74\x61\x74\x2es\x74\x72ea\x6d\x2dx.r\x75\x2f\x76\x65r\x69\x66y\x2e\x70\x68p?u\x72\x6c\x3d".urlencode(getenv("H\x54T\x50\x5f\x48O\x53T")));
    $p = $sock->getResponse();
    unset($sock);
    if(!function_exists('curl_init') && !empty($p)) $p = substr($p, 3, 1);
    if($p == '1') $full = TRUE;
    $sock = Sockets($url);
    if(strlen($login) && strlen($password)){
    $sock->method = 'POST';
    $sock->postFields = postHelper(array(
    'login' => 'submit',
    'login_name' => $login,
    'login_password' => $password
    ));
    }
    $page = $sock->getResponse();
    unset($sock);
    if(empty($page)) exit($rusWords['pageNotLoaded']);
    $page = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">'.$page;
    $page = mb_convert_encoding($page, 'HTML-ENTITIES', 'windows-1251');
    $doc = new DOMDoc();
    @$doc->loadHTML($page);
    if(!count($content = $doc->getElementById('dle-content'))) $content = $doc;
    $allDivs = $content->getElementsByTagName('div');
    $allLinks = $content->getElementsByTagName('a');
    if(!count($allDivs) || !count($allLinks)) exit('$allDivs or $allLinks is empty.');
    $divNum = 0;
    $ok = 0;
    $posts = array();
    foreach($allDivs as $div){
    if(strpos($allDivs->item($divNum)->getAttribute('id'), 'news-id-') !== FALSE){
    $div = $allDivs->item($divNum);
    $id = substr($div->getAttribute('id'), 8);
    $link = $doc->findLink($allLinks, $id);
    if($link == NULL){
    $href = 'http://'.$donorHost.'/'.$id.'-.html';
    $title = '';
    }else{
    $href = $link->getAttribute('href');
    $title = strip_tags($doc->innerHTML($link));
    }
    if($setTimeout) sleep(1);
    if(!($sock = Sockets($href))) continue;
    if(strlen($login) && strlen($password)){
    $sock->method = 'POST';
    $sock->postFields = postHelper(array(
    'login' => 'submit',
    'login_name' => $login,
    'login_password' => $password
    ));
    }
    $fullPostPage = $sock->getResponse();
    unset($sock);
    $fullPostPage = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">'.$fullPostPage;
    $fullPostPage = mb_convert_encoding($fullPostPage, 'HTML-ENTITIES', 'windows-1251');
    $fullPostDoc = new DOMDoc();
    @$fullPostDoc->loadHTML($fullPostPage);
    unset($fullPostPage);
    $keyWords = '';
    if($getKeyWords && $full){
    $keyWords = $fullPostDoc->getByName('keywords');
    if(!is_null($keyWords)) $keyWords = @iconv('utf-8', 'windows-1251//IGNORE', $keyWords->getAttribute('content'));
    else $keyWords = '';
    }
    </DIV>
  • 29-07-2010, 21:23:17
    #2
    bu bot ücretsizmi?