PHPBB Colorlib.com BOT
Colorlib botunun phpbb ye entegre edilmiş hali
Kodu çalıştırmak için öncelikli foruma giriş yapmanız gerekli yoksa anonym olarak ekler ve yönetici onayı ister.
$forum = 18; //hangi forumda olacağını burdaki id ile belirliyorsunuz
$site = “http://colorlib.com/wp/templates/”; ilk sayfada 56 kayıt var sonraki sayfa için https://colorlib.com/wp/templates/page/2/ olarak değiştirmeniz gerek
<?php set_time_limit(0);
function getData($data,$startTag,$finishTag){
$data= explode($startTag,$data);
$data= $data[1];
$data= explode($finishTag,$data);
$data= $data[0];
return $data;
}
$site = "http://colorlib.com/wp/templates/";
$data = file_get_contents($site);
preg_match_all('/<div class="portfolio-entry-readmore-wrap entry-readmore-wrap wpex-clr">.*?>.*?<\/div>/si', $data, $download);
define('IN_PHPBB', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
$phpbb_admin_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);
include($phpbb_root_path . 'includes/functions_posting.' . $phpEx);
include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
include($phpbb_root_path . 'includes/message_parser.' . $phpEx);
$user->session_begin();
$auth->acl($user->data);
$user->setup('common');
$gname = request_var('gname', '');
$steamid = request_var('steamid', '');
$realname = request_var('realname', '');
$age = request_var('age', '');
$gender = request_var('gender', '');
$location = request_var('location', '');
$games = request_var('games', '');
$often = request_var('often', '');
$ever = request_var('ever', '');
$why = request_var('why', '');
$offer = request_var('offer', '');
$willing = request_var('willing', '');
$active = request_var('active', '');
$other = request_var('other', '');
foreach($download as $d)
{
$toplam = count ($d);
for ($i = 0; $i <= $toplam; $i++) {
$sitegelen= getData($d[$i],'href="','"');
$verim = file_get_contents($sitegelen);
$baslik= getData($verim,'<h1 id="portfolio-single-title" class="single-post-title entry-title">','</h1>');
$resim= getData($verim,'data-lazy-src="','"');
$indirlink = getData($verim,'<a class="vc_general vc_btn3 vc_btn3-size-md vc_btn3-shape-rounded vc_btn3-style-flat vc_btn3-icon-left vc_btn3-color-green" href="','"');
$demo= getData($verim,'<a class="vc_general vc_btn3 vc_btn3-size-md vc_btn3-shape-rounded vc_btn3-style-flat vc_btn3-icon-left vc_btn3-color-purple" href="','"');
$message = "
Demo : [url]".$demo."[/url]
İndirme Linki : [url]".$indirlink."[/url]
[img]".$resim."[/img]
";
$forum = 18; //hangi forumda olacağını burdaki id ile belirliyorsunuz
$time = time();
$rawsubject = "Colorlib PHPBB Bot Tarafından Açılmıştır - ".$baslik." "; // Konu Başlığı
$my_subject = utf8_normalize_nfc($rawsubject, '', true);
$my_text = utf8_normalize_nfc($message, '', true);
$poll = $uid = $bitfield = $options = '';
generate_text_for_display($my_subject, $uid, $bitfield, $options, false, false, false);
generate_text_for_storage($my_text, $uid, $bitfield, $options, true, true, true);
$data = array(
'forum_id' => $forum,
'icon_id' => false,
'enable_bbcode' => true,
'enable_smilies' => true,
'enable_urls' => true,
'enable_sig' => true,
'message' => $my_text,
'message_md5' => md5($my_text),
'bbcode_bitfield' => $bitfield,
'bbcode_uid' => $uid,
'post_edit_locked' => 0,
'topic_title' => $my_subject,
'notify_set' => false,
'notify' => false,
'post_time' => 0,
'forum_name' => '',
'enable_indexing' => true,
);
submit_post('post', $my_subject, $user->data['username'], POST_NORMAL, $poll, $data);
$redirect_url = append_sid("{$phpbb_root_path}/viewforum.$phpEx?f=$forum", false, true, $user->session_id);
meta_refresh(2, $redirect_url);
}
}
trigger_error('Message Posted' . '<br /><br />Taking you back to the forum ' . sprintf('<a href="' . $redirect_url . '">', '</a>'));
?>
Yorumlar