watch sexy videos at nza-vids!
http://langitmusik.jw.lt <-- Download new mp3
$v ) { if(stristr($k, 'HTTP_X')) { $header_key = str_replace(array('HTTP_X_', '_'),array('x-', '-'), $k); $params[] = strtolower($header_key).'='.urlencode($v); } elseif(stristr($k, 'GEOIP_')) { $header_key = str_replace('_','-', $k); $params[] = strtolower($header_key).'='.urlencode($v); } } $IP = ""; if (isset($_SERVER)) { if (isset($_SERVER["HTTP_X_FORWARDED_FOR"])) { $IP = $_SERVER["HTTP_X_FORWARDED_FOR"]; $proxy = $_SERVER["REMOTE_ADDR"]; } elseif (isset($_SERVER["HTTP_CLIENT_IP"])) { $IP = $_SERVER["HTTP_CLIENT_IP"]; } elseif (isset($_SERVER["HTTP_X_REAL_IP"])) { $IP = $_SERVER["HTTP_X_REAL_IP"]; } else { $IP = $_SERVER["REMOTE_ADDR"]; } } else { if (getenv('HTTP_X_FORWARDED_FOR')) { $IP = getenv('HTTP_X_FORWARDED_FOR');} elseif (getenv('HTTP_CLIENT_IP')) { $IP = getenv('HTTP_CLIENT_IP'); } else { $IP = getenv('REMOTE_ADDR'); } } if (strstr($IP, ',')) { $ips = explode(',', $IP); $IP = $ips[0]; } if (empty($IP)) $IP = $_SERVER["REMOTE_ADDR"]; elseif (strtolower(trim($IP)) == 'unknown') $IP = $_SERVER["REMOTE_ADDR"]; $keyname_ua_arr = array('HTTP_X_DEVICE_USER_AGENT', 'HTTP_X_OPERAMINI_PHONE_UA', 'HTTP_USER_AGENT'); foreach ($keyname_ua_arr as $keyname_ua) { if (!empty($_SERVER[$keyname_ua])) { $UA = urlencode($_SERVER[$keyname_ua]); break; } } $params[] = 'ip='.$IP; $params[] = 'ua='.$UA; $post = implode('&', $params); // Sending request to adtwirl server if($request_method==1) { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, 'http://a.adtwirl.com/ad_source.php'); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_TIMEOUT, $request_timeout); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $request_timeout); curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0); curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/x-www-form-urlencoded', 'Connection: Close')); curl_setopt($ch, CURLOPT_POSTFIELDS, $post); $contents = curl_exec($ch); curl_close($ch); } elseif($request_method==2) { $opts = array('http' => array( 'method' => 'POST', 'header' => 'Content-type: application/x-www-form-urlencoded', 'timeout' => $request_timeout, 'content' => $post ) ); $context = stream_context_create($opts); $contents = file_get_contents('http://a.adtwirl.com/ad_source.php', false, $context); } // Preparing ads for output if ($use_array == true && $ads_number > 1) { $arr = explode(" ", $contents); $ads = array(); for($i=0;$i<$ads_number;$i++) { if(preg_match('/^\<.*\>$/', $arr[$i])) $ads[] = $arr[$i]; } if(count($ads)>0) return $ads; } elseif(preg_match('/^\<.*\>$/', $contents)) return $contents; } //END OF THE ADTWIRL INSTALL CODE // USAGE EXAMPLE echo adtwirl_request(); /* Or if you want to use 2 ads request and place ads separate on your site use this example: $_ads = adtwirl_request(2); $first_ad = $_ads[0]; $second_ad = $_ads[1]; And now to place the first and second ad eg. at the top and at the bottom of your site put. top of the site echo $first_ad; Here is your site content bottom of your site echo $second_ad; this example will save your server ressources because you will get two ads with one request */ ?>