After reading your comments - in which you state that you want to do this as a means of copy protection - my answer is an emphatical, forget it. This is not how copy protection works.
The only thing you can do using include()
is fetch source code from elsewhere to be interpreted on the local interpreter. This is childishly easy to crack: A malicious customer would to just have to echo()
the fetched code.
Executing the remote script remotely (on your server) won't help you, because the state of that script (variables, functions...) won't be present in the script you call it from.
The options you have are:
Compiling / encoding / obfuscating the script, possibly requiring a specific PHP module to execute it (lots of questions about this on SO)
Creating a real web service (e.g. using SOAP) that runs on your server, and performs the requested operations
For what it's worth, though, I personally do not purchase, nor recommend to clients to purchase, encoded scripts and scripts that need to "phone home" in order to work. I believe in protecting your products through a stringent license agreement (that will scare business customers into buying your product, because the risks of getting caught stealing are too expensive.)