Page 1 of 1

classes from different server

Posted: Sun Mar 26, 2006 1:16 am
by silent
okay,

say i got 2 servers.

server 1: http://server1.com
server 2: http://server2.com

and i have a collection of my classes say class1.php, class2.php all stored in http://server2.com/class/

and i want to use the class1php and class2.php for http://server1.com without saving the file onto that server1 too. can i do it so that i can just access the files on the server2.com?

i've tried include('http://server2.com') and did a few error checks like:

echo 'testing' and if statements all the error checks work but when i try to create the object it say class not found. can someone help me with this please?

regards

Posted: Sun Mar 26, 2006 1:21 am
by feyd
you'll have to rig the request to return the source code to server2, this is a security hole. Not only that, but it will cause server2's pages to run much slower than having the files on the server.