Jump to content

Redirecting to keep my scripts safe.


EsOne

Recommended Posts

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.