Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

remote page seeing

Homerun31Homerun31 Posts: 99Member
i have made php scripts for people to use and i want to make a page with serial codes for the people to use in order to get access to the scripts. is there a way for me to put a page with the codes on my hosting and put on the scripts i give them
[code]include("http://waterver.com");[/code]
is there a way for them to read the code by doing this?

Comments

  • DarQDarQ Posts: 1,625Member
    no, as long as apache is configured to pass .php files through the php interpreter. so, when you can browse to a .php file, apache will notice the .php extension and interprete it.

    you will only get .html files, even when including like this because an include also uses http.

    but, if the remote webserver also has an ftp daemon AND you use ftp wrappers (http is default for include when using url fopen wrappers) you actually can (when the remote ftpdaemon is properly configured) obtain php files with include/require.

    from http://www.php.net/include

    " If "URL fopen wrappers" are enabled in PHP (which they are in the default configuration), you can specify the file to be included using a URL (via HTTP or other supported wrapper - see Appendix L for a list of protocols) instead of a local pathname. If the target server interprets the target file as PHP code, variables may be passed to the included file using a URL request string as used with HTTP GET. This is not strictly speaking the same thing as including the file and having it inherit the parent file's variable scope; the script is actually being run on the remote server and the result is then being included into the local script."



    : i have made php scripts for people to use and i want to make a page with serial codes for the people to use in order to get access to the scripts. is there a way for me to put a page with the codes on my hosting and put on the scripts i give them
    : [code]include("http://waterver.com");[/code]
    : is there a way for them to read the code by doing this?
    :
    :

    [size=5][italic][blue]Dar[RED]Q[/RED][/blue][/italic][/size]
    Jou my no rap dy lekkere dikke tsjap

Sign In or Register to comment.