title: Including a remote php file as a resource
body: <p>I am trying to include remote php files as a resource but I am having a bit of trouble. I went into the <code>php.ini</code> files and set <code>allow_url_fopen</code> to <code>ON</code>. I also looked for the setting <code>allow_url_include</code> but it was not in the file, I added it to the php.ini file and also set that to on.</p>
  
  <p>If I try to include using</p>
  
  <pre><code> include ('http://somewebsite.com/lib/somescript.php');
  </code></pre>
  
  <p>The server / php spits out a message saying:</p>
  
  <blockquote>
    <p>URL file-access is disabled in the server configuration</p>
  </blockquote>
  
  <p>I also get a message saying:</p>
  
  <blockquote>
    <p>failed to open stream: no suitable wrapper could be found in blah blah blah</p>
  </blockquote>
  
  <p>The seconed way I am trying to acomplish the same result is using fopen but I am just getting the content of the file, thats not what I need I need my local script to see the remote script as an executabel rescource.</p>
  
  <pre><code>$myscript = fopen("http://someotherwebsite/lib/my_script.php", "r");
  $incmyscript= fread($myscript , 9999);
  fclose($myscript);
  // include in the contents of my_script.php    
  echo $incmyscript;
  </code></pre>
  
  <p>I have to be doing something wrong? I know echoing out the variabel $incmyscript is wrong, but I can't think of a way to place in the code. I am not sure if fopen is the best best way to get what I want.</p>
  
  <p>Any ideas?</p>