Check with PHP if file contains this text
<p>The php function should check if the file index.php contains the CMS link. 
I tried following but it's not working:</p>

<pre><code>    &lt;?php
    $file = file_get_contents("./index.php");
    if (strpos($file, "http://www.wordpress.com") !== false) {
        echo "Found";
    }
    else
    {
    echo "Not found";
    }
    ?&gt;
</code></pre>

<p>I am pretty new to PHP.
I have not found the answer using search.</p>
