Video Aula Anti AdBlock na Pagina me ou na Client 09.06.14 11:06
- Spoiler:
- Código:
<?php $antiblock_short_urls = array('http://goo.gl/VDJNS','http://goo.gl/akMnY','http://bit.ly/13EvOff','http://tr.im/44bh5','http://ow.ly/lZZFO'); ?>
<?php $antiblock_message = str_replace("\r\n", "\n", 'Por favor Desabilite o AdBlock do seu Navegador para que possa jogar sem problemas ^^ a Equipe agradece'); ?>
<?php
function imagestringbox($message) {
$font = 5;
$shadow = true;
$line_spacing = mt_rand(1, 5);//random line spacing influences base64 source and image size
$lines = explode("\n", utf8_decode($message));
$line_count = count($lines);
$max_len = 0;
foreach ($lines as $line) {
$max_len = max($max_len, strlen($line));
}
$line_height = imagefontheight($font);
$image_height = ($line_height * $line_count) + ($line_spacing * ($line_count - 1));
$image_width = imagefontwidth($font) * $max_len;
$image = imagecreate($image_width, $image_height);
$random_color = mt_rand(250, 255);
imagecolorallocate($image, $random_color, $random_color, $random_color);//random color influences base64 source
$line_spacing_i = 0;// first line does not have line spacing
for ($i = 0; $i < $line_count; $i++) {
if ($shadow) {
$shadow_color = imagecolorallocate($image, 200, 200, 200);
imagestring($image, 5, 1, $line_height * $i + $line_spacing_i + 1, $lines[$i], $shadow_color);
}
// text line
imagestring($image, 5, 0, $line_height * $i + $line_spacing_i, $lines[$i], imagecolorallocate($image, 0, 0, 0));
$line_spacing_i += $line_spacing;
}
ob_start();
imagepng($image);
$image_content = ob_get_contents();
ob_end_clean();
imagedestroy($image);
return '<img src="data:image/png;base64,' . base64_encode($image_content) . '" height="' . $image_height . '" width="' . $image_width . '" alt="" />';
}
?>
<?php $antiblock_message = imagestringbox($antiblock_message); ?>
<?php $antiblock_layer_id = chr(98 + mt_rand(0,24)) . substr(md5(time()), 0, 3); ?><?php $antiblock_html_elements = array ( 0 => 'div', 1 => 'span', 2 => 'b', 3 => 'i', 4 => 'font', 5 => 'strong', 6 => 'center',); $antiblock_html_element = $antiblock_html_elements[array_rand($antiblock_html_elements)]; ?>
<sttyle>#<?php echo $antiblock_layer_id; ?>{position:fixed !important;position:absolute;top:<?php echo mt_rand(-3, 3); ?>px;top:expression((t=document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop)+"px");left:<?php echo mt_rand(-3, 3); ?>px;width:<?php echo mt_rand(98, 103); ?>%;height:<?php echo mt_rand(98, 103); ?>%;background-color:#fff;opacity:.95;filter:alpha(opacity=95);display:block;padding:20% 0}#<?php echo $antiblock_layer_id; ?> *{text-align:center;margin:0 auto;display:block;filter:none;font:bold 14px Verdana,Arial,sans-serif;text-decoration:none}#<?php echo $antiblock_layer_id; ?> ~ *{display:none}</sttyle><div id="<?php echo $antiblock_layer_id; ?>"><<?php echo $antiblock_html_element; ?>>Please enable / Bitte aktiviere JavaScript!<br>Veuillez activer / Por favor activa el Javascript!<a href="<?php echo $antiblock_short_urls[ array_rand($antiblock_short_urls) ]; ?>">[ ? ]</a></<?php echo $antiblock_html_element; ?>></div><script>window.document.getElementById("<?php echo $antiblock_layer_id; ?>").parentNode.removeChild(window.document.getElementById("<?php echo $antiblock_layer_id; ?>"));(function(l,m){function n(a){a&&<?php echo $antiblock_layer_id; ?>.nextFunction()}var h=l.document,p=["i","s","u"];n.prototype={rand:function(a){return Math.floor(Math.random()*a)},getElementBy:function(a,b){return a?h.getElementById(a):h.getElementsByTagName(b)},getStyle:function(a){var b=h.defaultView;return b&&b.getComputedStyle?b.getComputedStyle(a,null):a.currentStyle},deferExecution:function(a){setTimeout(a,250)},insert:function(a,b){var e=h.createElement("<?php echo $antiblock_html_element; ?>"),d=h.body,c=d.childNodes.length,g=d.sttyle,f=0,k=0;if("<?php echo $antiblock_layer_id; ?>"==b){e.setAttribute("id",b);g.margin=g.padding=0;g.height="100%";for(c=this.rand(c);f<c;f++)1==d.childNodes[f].nodeType&&(k=Math.max(k,parseFloat(this.getStyle(d.childNodes[f]).zIndex)||0));k&&(e.sttyle.zIndex=k+1);c++}e.innerHTML=a;d.insertBefore(e,d.childNodes[c-1])},displayMessage:function(a){var b=this;a="abisuq".charAt(b.rand(5));b.insert("<"+a+'><?php echo str_replace(array("\n", "'"), array('<br>', "'"), $antiblock_message); ?> <a href="<?php echo $antiblock_short_urls[ array_rand($antiblock_short_urls) ]; ?>">[ ? ]</a>'+("</"+a+">"),"<?php echo $antiblock_layer_id; ?>");h.addEventListener&&b.deferExecution(function(){b.getElementBy("<?php echo $antiblock_layer_id; ?>").addEventListener("DOMNodeRemoved",function(){b.displayMessage()},!1)})},i:function(){for(var a="<?php echo implode(",", array_merge(array_rand(array_flip(array('ofie_ad','right-ads-4','ads','ADS_2','AD_Zone','AD_gallery','Ad-3-Slider','Ad3Left','AdAboveGame','AdAuth1','AdAuth4','AdBanner_F1','AdBar','AdBox2','AdButtons','AdPanelLogo','AdSense3','Ad_RightTop','Ads_OV_BS','AdvArea','AdvFooter','AdvHead','AdvHeader','Advertorial','BDV_fullAd','CONTENTAD','ContentAd1','DFPAD_MR','FooterAd','HALHouseAd','HeroAd','IM_AD','LeftAd','LftAd','MPUAdSpace','PhotoAd1','TopAd','WNAd47','ab_adblock','aboveAd','ad-125x125','ad-250','ad-300a','ad-300x40-1','ad-970','ad-abs-b-0','ad-abs-b-3','ad-block','ad-border','ad-bottom','ad-box2','ad-buttons','ad-code','ad-cube-sec','ad-img','ad-inner','ad-leader','ad-main','ad-middle','ad-mrec','ad-popup1','ad-pushdown','ad-rotator','ad-section','ad-shop','ad-sidebar2','ad-slot-1','ad-space-2','ad-special','ad-spot-one','ad-squares','ad-tape','ad-top','ad-top-wrap','ad-wrapper1','ad02','ad1-468x400','ad10Sp','ad160-2','ad250','ad2CONT','ad300c','ad300x50','ad31','ad5_inline','ad728','ad768top1','adBox350','adClickMe','adColumn','adDiv0','adDiv728','adFot','adFoxBanner','adHolder1','adHolder2','adHolder4','adIsland','adLB','adLayer','adLink1','adLrec','adMPU','adMedRect','adMeld','adMid1','adMonster1','adPlacer','adScraper','adSenseTall','adSidebarSq','adSite','adSky','adSpace10','adSpace6','adSpace7','adTag1','adTeaser','adTextLink','adTicker','adTile','adTop2','adTower1','adVcss','ad_120x600','ad_2','ad_3','ad_300c','ad_300x600','ad_450x280','ad_500x150','ad_700x430','ad_728','ad_940','ad_G','ad_Top','ad_banner_1','ad_bar','ad_block','ad_box','ad_box_ad_0','ad_choices','ad_feature','ad_feedback','ad_footerAd','ad_gallery','ad_hf','ad_home','ad_island','ad_layer','ad_layer2','ad_left','ad_middle_2','ad_mpu','ad_netpromo','ad_new','ad_one','ad_overlay','ad_post','ad_poster','ad_rail','ad_rect2','ad_region2','ad_region3','ad_row_home','ad_sec','ad_space','ad_stream10','ad_stream17','ad_unit','ad_wrapper2','adbard','adblock2','adbottom','adbuttons','adcontainsm','add_160x600','addiv-top','adfreead','adheadhubs','adhide','adhzh','adimg0','adl_250x250','adl_300x100','adl_728x90','adlayerad','adlove','admod2','adnews','adright','ads-block','ads-footer','ads-rt','ads-tp','ads-vers7','ads336x280','ads7','ads728x90','adsBar','adsDiv6','adsIframe','adsLREC','adsSPRBlock','ads_bar','ads_bigrec1','ads_center','ads_html1','ads_line','ads_mads_r1','ads_place','ads_right','ads_top_sec','ads_tower1','adscenter','adscolumn','adsense-new','adsense04','adsense_top','adshowbtm','adslot','adslot1189','adspace','adsplace1','adspot-1','adspot-2b','adsright','adstuff','adtable_top','adtag8','adtech_3','adtopbox','adtxt','adunitl','adv-preroll','adv-right1','adv-x36','adv-x40','adv160x600','adv300top','adv300x250','advHome','adv_728','adv_Skin','adv_box_a','adv_center','adv_holder','adv_network','adv_overlay','adv_right','adv_sky','adver','adver2','adverFrame','advert-text','advert-top','advert_05','adverts','advertspace','advtext','advtop','adxtop2','apolload','area13ads','articlead1','atad2','b5ad300','bLinkAdv','banner_ads','bcaster-ad','bigadbox','bigadspace','bigboard_ad','blancco-ad','blockAds','block_ad','blog-ad','blogads','blox-big-ad','bnr-468x60','bnr-728x90','bodyAd4','bott_ad2','bottom-ad-1','bottomMPU','bottom_ad','bottomadbar','box1ad','boxAd','boxad','boxad5','btnAds','cb-ad','center_ad-0','channel_ad','circ_ad','closeAdsDiv','columnAd','contentAd','content_adv','content_mpu','contest-ads','ctl00_TopAd','ctl00_adCar','cube_ads','customAd','dartad28','dfp-ad-2','div-ad-2','div-ad-flex','divAd','divAdHere','divAds','divLeftAd12','dnn_adTop','dp_ad_1','eastAds','embedAD','featAds','featureAd','flash_ads_1','floatingAd','footer-ads','footer-affl','four_ads','fpad2','frnBannerAd','frontPageAd','ft-ad','gasense','gglads','gl_ad_300','glamads','goads','gog_ad','googlead','gpt-ad-1','gsyadtop','hd_ad','hdtv_ad_ss','head-ad-1','head-ads','header_ads2','headline_ad','hiddenadAC','homeAds','homepageAd','homepage_ad','horizads728','hpSponsor','iframe_ad_2','imPopup','inline-ad','inlineads','innerad','iqadoverlay','iqadtile8','iqd_mainAd','iwad','jobsAdBox','jt-advert','jupiter-ads','kdz_ad2','lblAds','leadad_1','left-ad-2','leftAds','left_ads','left_bg_ad','ligatus','localAds','lower_ad','lowerads','main-tj-ad','mainAd','mastAdvert','memberad','menuad','mhheader_ad','microAdDiv','midbarad','midbnrad','middlead','modal-ad','module_ad','monsterAd','moogleAd','moreads','mosTileAds','mpuDiv','mpu_ad','mpu_text_ad','mtSponsor','nationalad','navbar_ads','nbaGI300ad','nbaVid300Ad','newAd','nrAds','ns_ad3','oas_Right2','oas_Top','oas_Top1','objadscript','pageads_top','partner-ad','photoAdvert','popupadunit','postAd','premiumads','publicidad','quigo','quigo-ad','rail_ad','rect_ad','related_ads','rh-ad','right-adds','rightSideAd','right_ads','right_bg_ad','rightbar_ad','rightinfoad','rightskyad','rotatingads','rpuAdUnit-0','rr_ad','rxgleftbar','sb-ad-sq','sb_advert','searchAd','search_ad','section_ad','serveAd1','shortads','sideAdSmall','side_adv_2','sidead','sidead1','sideadbox','sidebar2ads','sidebarAd','sidebar_ads','sideline-ad','sidepad-ad','singleAd','site_top_ad','sky-right','skyAd','skyads','socialAD','special_ads','speed_ads','sponsAds','sponsLinks','sponsorText','sponsor_bar','sponsor_div','spotadvert2','squareAd','stickySkyAd','submenu-ads','swads','synch-ad','takeoverad','tblReklama2','td_adunit2','textAd','textad','tmcomp_ad','toaster_ad','top-ads-1','top-advert','top-left-ad','topAdShow','topAds2','topMPU','top_ad','top_adv','top_adv_728','top_advert','topad2','topadspace','topbar-ad','topleaderAd','topsponad','toptextad','tour300Ad','tour728Ad','travel_ad','turnAD','upperMpu','upperad','wg_ads','wrapAd','x-houseads','x01-ad','yahooad-tbl','yieldaddiv','ylf-lrec2')), 7), array("ad", "ads", "adsense"))); ?>".split(","),b=a.length,e="",d=this,c=0,g="abisuq".charAt(d.rand(5));c<b;c++)d.getElementBy(a[c])||(e+="<"+g+' id="'+a[c]+'"></'+g+">");d.insert(e);d.deferExecution(function(){for(c=0;c<b;c++)if(null==d.getElementBy(a[c]).offsetParent||"none"==d.getStyle(d.getElementBy(a[c])).display)return d.displayMessage("#"+a[c]+"("+c+")");d.nextFunction()})},s:function(){var a={'pagead2.googlesyndic':'google_ad_client','js.adscale.de/getads':'adscale_slot_id','get.mirando.de/miran':'adPlaceId'},b=this,e=b.getElementBy(0,"script"),d=e.length-1,c,g,f,k;h.write=null;for(h.writeln=null;0<=d;--d)if(c=e[d].src.substr(7,20),a[c]!==m){f=h.createElement("script");f.type="text/javascript";f.src=e[d].src;g=a[c];l[g]=m;f.onload=f.onreadystatechange=function(){k=this;l[g]!==m||k.readyState&&"loaded"!==k.readyState&&"complete"!==k.readyState||(l[g]=f.onload=f.onreadystatechange=null,e[0].parentNode.removeChild(f))};e[0].parentNode.insertBefore(f,e[0]);b.deferExecution(function(){if(l[g]===m)return b.displayMessage(f.src);b.nextFunction()});return}b.nextFunction()},u:function(){var a="/ad/728-,/ads/pop.,/adsright.,/adsystem/ad,/banners/ad11.,/eros.htm,/inlineads/ad,/layer-ads.,/shared/ads.,/storage/adv/ad".split(","),b=this,e=b.getElementBy(0,"img"),d,c;e[0]!==m&&e[0].src!==m&&(d=new Image,d.onload=function(){c=this;c.onload=null;c.onerror=function(){p=null;b.displayMessage(c.src)};c.src=e[0].src+"#"+a.join("")},d.src=e[0].src);b.deferExecution(function(){b.nextFunction()})},nextFunction:function(){var a=p[0];a!==m&&(p.shift(),this[a]())}};l.<?php echo $antiblock_layer_id; ?>=<?php echo $antiblock_layer_id; ?>=new n;h.addEventListener?l.addEventListener("load",n,!1):l.attachEvent("onload",n)})(window);</script>