PHP Get Source and Search for Word
Question: I need help i want to code a program that search for a word inside the source
code.

Here a Example in Python:

    
    
    import urllib2, re
    
    site = "http://stackoverflow.com/"
    tosearch = "Questions"
    source = urllib2.urlopen(site).read()
    if re.search(tosearch,source):
         print "Found The Word", tosearch
    


Answer: 
    <?php
    
    $site = "http://stackoverflow.com/";
    $tosearch = "Questions";
    $source = file_get_contents($site);
    if(preg_match("/{$tosearch}/", $source)): // fixed, thanks meouw
      echo "Found the the word {$tosearch}";
    endif;
    
    ?>
    

