back to the working version
<?
if (@$_GET['code']){
    echo 
"<a href='/whoami'>back to the working version</a><br />";
    echo 
"<pre>".highlight_string(wordwrap(file_get_contents('whoami.php'), 150"\n"))."</pre>";
    exit;
}
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    
    <title>zach b</title>

<? require('include.php'); ?>
<META NAME="Description" CONTENT="Many things to do here. Come visit?">

</head>

<body>
    <div id="container">
        <h1>who am i?</h1>
        <div style="font-size:.9em; position:absolute; top:5.8em; left:17em;">
        a thing by <a href="/">zach blume</a>
        </div>
        <p>who does google think you <em>are</em>?! how many people do you think google you after meeting you? this searches for the phrase "your_name is
..." on the google search for &quot;your_name&quot;.</p>
        <form method="get" action="/whoami">
          <input type="text" class="text" name="name" value="<?=((@$_GET['name'])?$_GET['name']:'type first then last name here')?>"
onclick="this.value=(this.value=='type first then last name here'?'':this.value)" width="200" style="width:200px !important" />
          
          <input type="submit" class="submit" value="tell me who i am" />  &nbsp;&nbsp;&nbsp;
          try: "zach blume" (apparently there is another one out there), "king", "mlk", "bird"
      </form>
        <? if (isset($_GET['name'])): ?>

    <?PHP
    
// fetch the google search
    
$name urlencode($_GET['name']);
    
$n urldecode($name);
    
$url "http://www.google.com/search?hl=en&client=firefox-a&rls=org.mozilla%3Aen-US%3Aofficial&hs=i9&q={$name}&aq=f&oq=&aqi=g-p2g1g-s1g2";
    
$file file_get_contents($url);
    
    
// get rid of code.
    
$file preg_replace("!<script(.*?)>(.*?)</script>!"" "$file);
    
$file preg_replace("!<style(.*?)>(.*?)</style>!"" "$file);
    
    
// get rid of html tags
    
$file preg_replace("!<.*?>!"" "$file);
    
    
// get rid of wikipedia and other (parenthesis with stuff inside them) or (parentehesis w/ stuff that don't finish...
    
$file preg_replace("!\(.*?(\)|\.\.\.)!"" "$file);
    
    
// find the descriptions
    
$z preg_match("!{$n}(s?)\s*(is|was|are|were)(.*?)[\.,;-=/]!i"$file$match);
    
$z preg_match("!{$n}(s?)\s*[a-zA-Z0-9]*\s*(is|was|are|were)(.*?)[\.,;-=/]!i"$file$match2);
    
$z preg_match("!im (.*?)[\.,;-=/]!i"$file$match3);
    
$z preg_match("!i am(.*?)[\.,;-=/]!i"$file$match4);
    
$answer = !empty($match[3])?$match[3]:(!empty($match2[3])?$match2[3]:$match3[3]);
    
?>
    
    <p>This is what google thinks:</p>
    <p><strong>You are <?=$answer?>.</strong></p>
    
    
<? endif; ?>
<br /><br /><br /><br /><br />
<p style="width:350px;color:#999">psst: from this i've learned that many people's first google result is facebook
(if yours is the first result, you'll show up as "on facebook").
maybe you should double check your profile is protected, yeah?<br /><br />want to see <a href="/whoami?code=true">the code</a>?</p>
    </div>
    
</body>
</html>
1