Recently Posted

Feb
17


Using a remotely hosted PHP include file

Well here is something I was sure was impossible until the other day. I managed to use a remotely hosted include file in one of my pages. The reason I did this was because all of the coding needed to connect to a database on another site. I think the only reason it worked though is because although the code was on another site, it is on the same server. Still, it worked for me!

One Response to “Using a remotely hosted PHP include file”

  1. hmldit said on April 14th, 2007 at 7:38 pm:

    Using remote files are aloud you just need to use a wrapper(see previous blog entry).
    However,
    A remote file may be processed at the remote server (depending on the file extension and if the remote server runs PHP or not) but it still has to produce a valid PHP script because it will be processed at the local server. If the file from the remote server should be processed there and outputted only, readfile() is a much better function to use. Otherwise, special care should be taken to secure the remote script to produce a valid and desired code.

Leave a Reply