EsOne Posted December 21, 2009 Share Posted December 21, 2009 I have someone that wants me to write a basic script for his page. The page it will be on in his server will consist of only the script I am writing. Is there a way (and if so, how?) to make it where the .php file stays on my server, but works on his page on his server? This will make sure none of the script gets altered, or copied. Quote Link to comment Share on other sites More sharing options...
nafetski Posted December 21, 2009 Share Posted December 21, 2009 Yes, there are probably ways you can do this...but I think it would be unnecessary. What are you worried about exactly? The security of your code? There are applications where you give him encrypted source code (ioncube is the first that comes to mind). Now if you are just worrying about the guy being a retard and overwriting your script, you could set up a cron to push your script to his site nightly? I think that maybe the solution you're asking for isn't the best for your problem. Quote Link to comment Share on other sites More sharing options...
oni-kun Posted December 21, 2009 Share Posted December 21, 2009 I have someone that wants me to write a basic script for his page. The page it will be on in his server will consist of only the script I am writing. Is there a way (and if so, how?) to make it where the .php file stays on my server, but works on his page on his server? This will make sure none of the script gets altered, or copied. Yes, you can place your page.php file for example in /secure/page.php (on your server) and on his server include it on theirs: <?php include('http://www.your_domain.com/secure/page.php'); ?> Note fopen and allow_url_include must be on in php.ini to allow this. Quote Link to comment Share on other sites More sharing options...
EsOne Posted December 21, 2009 Author Share Posted December 21, 2009 I have someone that wants me to write a basic script for his page. The page it will be on in his server will consist of only the script I am writing. Is there a way (and if so, how?) to make it where the .php file stays on my server, but works on his page on his server? This will make sure none of the script gets altered, or copied. Yes, you can place your page.php file for example in /secure/page.php (on your server) and on his server include it on theirs: <?php include('http://www.your_domain.com/secure/page.php'); ?> Note fopen and allow_url_include must be on in php.ini to allow this. Thanks AGAIN oni. xD Now, I just need to find out how to do the second part of your recommendation. Quote Link to comment Share on other sites More sharing options...
EsOne Posted December 21, 2009 Author Share Posted December 21, 2009 Well, oni. LOL. You know that I am a newbie to this all. Where is my php.ini file? And, how do I add what you recommended. I had read that on GoDaddy, it should be in the root directory. I am not seeing it. Do I create one? Quote Link to comment Share on other sites More sharing options...
trq Posted December 21, 2009 Share Posted December 21, 2009 Including a script from a remote location like that will only include the output of the script. Its not the same as having the script on the local server. Quote Link to comment Share on other sites More sharing options...
EsOne Posted December 21, 2009 Author Share Posted December 21, 2009 Including a script from a remote location like that will only include the output of the script. Its not the same as having the script on the local server. As long as the output goes onto the persons page is all I need. It is very easy script. I want the output from my script on my server to show on his webpage without having my script on his server. I was thinking the include would work, but I am not sure on how to change the php.ini file, as 1. I cannot find it, and 2. I don't know what I add. (Newer to php) I am guessing I would just type: fopen = on allow_url_include = on But, I don't know. I need help. Quote Link to comment Share on other sites More sharing options...
trq Posted December 21, 2009 Share Posted December 21, 2009 If godaddy allow a local php.ini file then simply create the file within your document root and place.... allow_url_fopen = 1 allow_url_include = 1 within it. Quote Link to comment Share on other sites More sharing options...
EsOne Posted December 21, 2009 Author Share Posted December 21, 2009 Thanks I see why it didn't want to work the first time I tried. I had to name it php5.ini Anyways. I added what you said and now get the following error: Warning: include() [function.include]: php_network_getaddresses: getaddrinfo failed: Name or service not known in /home/content/e/s/o/esone/html/test/test.php on line 2 Warning: include(http://dolphinmania.pandaandpenguin/secure/index.php) [function.include]: failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known in /home/content/e/s/o/esone/html/test/test.php on line 2 Warning: include() [function.include]: Failed opening 'http://dolphinmania.pandaandpenguin/secure/index.php' for inclusion (include_path='.:/usr/local/php5/lib/php') in /home/content/e/s/o/esone/html/test/test.php on line 2 Quote Link to comment Share on other sites More sharing options...
trq Posted December 21, 2009 Share Posted December 21, 2009 The address is incorrect, I can't get to it from here either. Quote Link to comment Share on other sites More sharing options...
oni-kun Posted December 21, 2009 Share Posted December 21, 2009 Yes, "dolphinmania.pandaandpenguin" will assume the top level domain is ".pandaandpenguin" Example: http://dolphinmania.pandaandpenguin/secure/index.php What it should be: http://dolphinmania.pandaandpenguin.com/secure/index.php Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.