Hi
I must include a file that contain a class from remote site.
If I include as .php (include "http://www.**.com/myclass.php) don't work as processed as php
If I include as .inc (include "http://www.**.com/myclass.inc) is ok
BUT
if user visit http://www.**.com/myclass.inc can view my class in the browser and I need that this class is not public and not visibile..
any help ?
thx
include class from remote site
Moderator: General Moderators
If you don't want anyone to see the code of the file you want to include you can do following:
create one more file: myclass2.php
If this file is accessed using "?get=some_secret_code", then output the content of myclass.php using "echo file_get_contents('myclass.php');"
To include the class from remote server use:
include('http://.../myclass2.php?get=some_secret_code');
create one more file: myclass2.php
If this file is accessed using "?get=some_secret_code", then output the content of myclass.php using "echo file_get_contents('myclass.php');"
To include the class from remote server use:
include('http://.../myclass2.php?get=some_secret_code');