title: using includes cross domain that contain php code - failing
body: <p>I have a series of web sites all hosted on the same server with different domains.  I want to host some common PHP scrips and then be able to call these from the other domains.</p>
  
  <p>Im am a bit fresh with my php so pls excuse code attempts - I have tried iterations of the following which may try and help you understand what I am aiming for!</p>
  
  <p>from within php tags ...</p>
  
  <pre><code>include('http://www.mydomain/common_include.php?show_section=$section');
  </code></pre>
  
  <hr>
  
  <pre><code>$show_section = $_GET['show_section'];
  include('http://www.mydomain/common_include.php');//Then $show_section would be available to the included file/cod
  </code></pre>
  
  <hr>
  
  <p>Finally I have tried pulling in the include which contains a function then trying to run that include from the parent script.</p>
  
  <ul>
  <li>I would much prefer to keep this PHP
  orientated rather than getting
  involved with the server (file
  systems etc (but I can change
  permissions etc)</li>
  <li>I can but would prefer not to just upload the same library to each of the domains separately</li>
  <li>I understand PHP is run on the server hence maybe problematic to include scripts across onto another server.</li>
  </ul>
  
  <p>Thanks in advance.</p>
  
  #
  
  <p>EDIT
  OK OK - I get that its bad practice so will not do it....THANKS VERY MUCH FOR THE QUICK ANSWERS.
  However is there any other recommendations of how to esentially show this basic php app on all of the sites with out haveing to add the files to the root of each site?  Just to prevent massive script duplication...(thinking out loud call the scripts in from a db or anyother soloutions)
  Again thanks for your assistance</p>