Deploy PHP website to client server without showing PHP files

Posted by ColmF on Stack Overflow See other posts from Stack Overflow or by ColmF
Published on 2010-06-07T21:19:00Z Indexed on 2010/06/07 21:22 UTC
Read the original article Hit count: 150

Filed under:
|
|

I asked a recent question regarding the use of readfile() for remotely executing PHP, but maybe I'd be better off setting out the problem to see if I'm thinking the wrong way about things, so here goes:

  • I have a PHP website that requires users to login, includes lots of forms, database connections and makes use of $_SESSION variables to keep track of various things
  • I have a potential client who would like to use the functionality of my website, but on their own server, controlled by them. They would probably want to restyle the website using content and CSS files local to their server, but that's a problem for later
  • I don't want to show them my PHP code, since that's the value of what I'd be providing.

I had thought to do this with calls to include() from the client's server to mine, which at least keeps variable scope intact, but many sites (and the PHP docs) seem to recommend readfile(), file_get_contents() or similar. Ideally I'd like to have a simple wrapper file on the client's server for each "real" one on my server.

Any suggestions as to how I might accomplish what I need?

Thanks, ColmF

© Stack Overflow or respective owner

Related posts about php

Related posts about hide