Of course the functions in the remote script will not be available to the other script. If this was possible, your very worry that it would leak to the public would come true. If this was true, it would also be true that all banks, government websites, and other secure web sites would be extremely vulnerable if they used PHP.
The only way you're going to be able to (try to) prevent your source from leaking is use something like IonCube or SourceGuardian, but even then, it's not 100% secure.
The only way I could see around this one is to make a file containing the source code which can be read in by the second script, but require some sort of authentication.