include php function on different server
Posted: Fri Jul 18, 2008 10:54 am
I want to protect my source code in the cms i have written by including files on a different server to my clients'. when i include a file on a different server i cannot get the function on that file to work. see the following:
File on server 1: http://www.example1.com/server1.php
File on server 2: http://www.example2.com/server2.php:
When i call http://www.example1.com/server1.php i get the following error:
Fatal error: Call to undefined function: TestFunction()
Is there a way i can do this? or any suggestions on how to protect my logic simply and easily?
File on server 1: http://www.example1.com/server1.php
Code: Select all
<?php
$path = "http://www.example2.com/";
require $path."server2.php";
TestFunction();
?>Code: Select all
<?php
function TestFunction(){
echo "Test works";
}
?>Fatal error: Call to undefined function: TestFunction()
Is there a way i can do this? or any suggestions on how to protect my logic simply and easily?