Jump to content

Better way to pretect a script?


devWhiz

Recommended Posts

So, I've been compiling all of my scripts to .exe so no one can see my code and release it to other people without my permission so on my site I have place a script that, if I put a users IP in the script it will display their ip when they load the script

 

this is the code for the script hosted on my site

 

<?php
$ADDRESS = $_SERVER['REMOTE_ADDR'];
if(stristr($ADDRESS, '00.000.000.000') || stristr($ADDRESS, '123.456.16.548'))
{ echo $ADDRESS; }else{ echo "NOT AUTHORIZED TO VIEW THIS PAGE"; }
?>

 

so if the persons IP address is not 00.000.000.000 or 123.456.16.548 it will not display their IP

 

so on the script I made this code

 

<?php 

  $ip = file_get_contents('script URL');
  if(stristr($ip, '123.456.16.548'))  {
  echo "Script can begin....";
  // CODE HERE //
  }else { echo "you are not authorized to use this script"; } 
  
  ?>

 

when the script is in .exe form they cannot edit the link or the IP that is in the script..

 

and if someone sends it out I can take their IP off of the if statement in the script on my site and it wont display their ip for the script the verify

 

Is this good or is there a better way to do this?

 

mysql doesnt work well when the script is encoded, otherwise I would have use mysql

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.