topical media & game development 
  
 
 
 
 
  
    
    
  
 server-webapi-code-06-nusoap.monitor.php / php
  <?php
  // Take search list
  // Iterate through it
  //  Repeat search incrementing start value untill domain is found
  //  Record placement, time
  //  Compare placement to yesterdays
  //  If worse, generate note
  //  If Better, generate note
  // Send notes if present
  // Exit
  require("../common_db.php");
  require('../lib/nusoap.php');
  //Load Search List
  searchTerms = getAssoc(client = new soapclient("http://example.preinheimer.com/google/googleapi/GoogleSearch.wsdl", true);
  length = strlen(message = "";
  foreach(term)
  {
    //echo "WOrking on term";
    searchQuery = allowance = start = 0;
    found == 0 && result = runGoogleSearch(&searchQuery, found, start=searchQuery";
      result['resultElements'];
      foreach(item)
      {
        if(substr(length) == query = "INSERT INTO 06_google_monitor_results (`query`, `placement`, `timestamp`) 
          VALUES ('placement', null)";
          
       //   echo 
          insertQuery(query);
          desiredURL isn't present in " . placement++;
      }
      start + 10;
    }
    if (query = "INSERT INTO 06_google_monitor_results (`query`, `placement`, `timestamp`) 
          VALUES ('placement * 10 . "', null)";
    }
    searchQuery, searchQuery, query = "SELECT placement FROM 06_google_monitor_results 
    WHERE `query` = 'query . "<br>";
    query, 2);
    recentResults[0]['placement'];
    recentResults[1]['placement'];
    if (lastRun)
    {
      return ""; 
    }else if ((lastRun) > searchQuery has dropped from thisRun<br>\n";
      return "WARNING ranking for lastRun to lastRun - allowance)
    {
      echo "Good News! Ranking for lastRun to searchQuery has increased from thisRun\n";
    }else
    {
      return ""; 
    }
  }
  
  function runGoogleSearch(searchQuery, query = array(
            'key'=>'u6U/r39QFHK18Qcjz/XdWSbptVaj9k1t',
            'q'=>start,
            'maxResults'=>10,
            'filter'=>true,
            'restrict'=>'',
            'safeSearch'=>true,
            'lr'=>'',
            'ie'=>'',
            'oe'=>''
    );
    
    client->call("doGoogleSearch", result;
  }
  
  ?>
  
  
(C) Æliens 
20/2/2008
You may not copy or print any of this material without explicit permission of the author or the publisher. 
In case of other copyright issues, contact the author.