include an external .php file using php without changing config.ini
<p>Hi i want to include an external .php file inside my php file.</p>

<p>this .php file has some variable declaration needed inside my page.</p>

<p>i tried using file_get_contents but it just echoes the lines inside.</p>

<p>tried:</p>

<pre><code>function getter($url) {
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_HEADER, 0);
    $data = curl_exec($ch);
    curl_close($ch);
    return $data;
}

echo getter('www.somehting.com/phpfile.php');
</code></pre>

<p>-still not working</p>

<p>also tried:</p>

<pre><code>$code = file_get_contents($url);
eval($code);
</code></pre>

<p>is  there anyway for me to do this without changing the config.ini?</p>

<p>I have access to .htaccess on the page where the file should be included.</p>

<p>the file is on a different server "rackspace".</p>

<p>Thank You.</p>
