Simple Callback Script For Tracking Your Script
Many free script that distributed have a callback script inside them. Function is to tracking their script so they know where ever the script has been installed. Usually, they encode this callback with main part of script so user can’t remove it without break the script.
If you are PHP developer and want to be able to track your script maybe you can use this simple callback script. First look this script and insert into your main script. It’s up to you to insert in top, middle, bottom or everywhere but make sure you’re not breaking your original script.
$f = @fopen("http://example.com/track.php?url=$_SERVER[HTTP_HOST]&path=$_SERVER[SCRIPT_FILENAME]","r"); @fread($f,10); @fclose($f); |
This script try to send information to track.php with remote URL and write the $_SERVER[HTTP_HOST] and $_SERVER[SCRIPT_FILENAME] where the script is running. Change example.com to your domain.
After that we need a script to handle the proccess. Let’s create track.php for done this job. This is the code.
$url = @$_GET['url']; $path = @$_GET['path']; $entry_line = "$url | $path "; //give ENTER to break into new line in text file $fp = fopen("counter.txt","a"); fputs($fp,$entry_line); fclose($fp); |
This code just try to open text file (counter.txt) and write variable being sent by callback script. Make sure you create and CHMOD text file to 777. That’s it. Simple right?
Now you can encode callback script so people can read original script (in case remove it). You can try Free online service to encode PHP code in Byterun Online Free PHP .
Thanks to Vooler at DP forum