Re: Genus who came up with "Self Destruct Code" & "Copy Pro tection"
| From: | Miguel Cruz | Date: | Tue, 14 May 2002 20:37:30 +0000 |
| Subject: | Re: Genus who came up with "Self Destruct Code" & "Copy Pro tection" | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-97624@lists.php.net to get a copy of this message | ||
On Tue, 14 May 2002, 1LT John W. Holmes wrote:
> ----- Original Message -----
> From: "Miguel Cruz" <mnc@stoic.net>
>> On Tue, 14 May 2002, Collins, Robert wrote:
>>> $core_functions =
>>>
>>> "http://www.domain.com/path/to/file/core_functions.php";
>>> require_once($core_functions);
>>
>> 1) You'd have to eval() it rather than requiring it.
>
> I don't think you can eval() a remote file.
I didn't provide code, but the idea was that you'd read the remote file
into a string and then eval it. Though, now, upon reading the
documentation for include(), I see that you can just do that without all
my eval nonsense.
>> 2) lynx -source -dump
> http://www.domain.com/path/to/file/core_functions.php >
> core_functions.php
>
> All this will do is return you the HTML generated by the PHP file, which
> will be empty, probably, if this is a file of function declarations.
Yes, fair enough, in order for the above (eval / require) to work as
described, the server would have to be willing to hand you the PHP source.
Which, in many cases, wouldn't happen with a .php suffix. Anyway, the
point is that anything that you can require() or include() or whatever off
a remote server, can also be fetched with other tools for leisurely
inspection and duplication.
>> 3) As in Jason's somewhat more effective example, it's slow.
>
> Could you imagine if this worked? You could "include" code from anyone's PHP
> server. Someone please correct me if I've just got this all wrong.
Jason's example was just a slightly ornate form of RPC. I don't see any
reason why it wouldn't work, I just think it introduces performance
problems and failure points and therefore isn't an optimal solution.
miguel