Can we have a look at the coding please
EDIT: only joking![]()
Can we have a look at the coding please
EDIT: only joking![]()
I posted a simple one
I didn't go into anything deeper then just that.
Yep, I knew that.
Dentifrice (Denti being the latin prefix for tooth, frice for paste)
Dent EEE frice vs Dent UHHHH Frice
I am southern so down here we say, Dentuhfrice
Yeh but at the end of the day if the file is encoded or whatever why does it matter, unless you give out the liscencing link and the get variables or whatever.
You did what was needed, nothing more "advanced" is needed really.
And 15pounds, IMO is quite expensive, but profitable hehe![]()
Yeah, its a simple way of protecting something.
Nothing more is really needed. You could make it output 1, 2, 3 or any number and
if($response == "1") {
do something
}
and so on.
Cool when are you going to make the lock.php???Pretty much, unless you encrypt it
Thats pretty much it for the check script, you still need to write the lock.phpPHP Code:<?
// Simple thingy
// Coded in quick reply box so its probably bad
$server = $_SERVER['SERVER_NAME'];
$when = date("r");
$response = file_get_contents("http://lockplace.com/lock/lock.php?server=$server&time=$when");
if($response == "active") {
}else{
if($response == "expired") {
echo "Your license has expired";
exit;
}
if($response == "suspended") {
echo "Your license has been suspended";
exit;
}
if($response == "none") {
echo "Are j00 stupid, you don't even have a license for this domain";
exit;
}
}
?>
I will make one of these tonight or tomorrow
I will make a simple one tonight, deal?
Won't be encoded or nothing.
Ok cool thank you.
All the people who use it, will have to give you thanks for your time.
Here is a Sample config file for the people using the system (customers);
Here is licensing.php (to be included in the config file):PHP Code:<?
// Sample Config
include "licensing.php";
$server = "localhost";
$username = "this_username";
$password = "1337";
$database = "test";
// License
$key = "wafr5156dsf1a561";
?>
Lock.phpPHP Code:<?
// Simple thingy
// Coded in quick reply box so its probably bad
include "config.php";
$server = $_SERVER['SERVER_NAME'];
$when = date("r");
$response = file_get_contents("http://lockplace.com/lock/lock.php?server=$server&time=$when&key=$key");
if($response == "active") {
}else{
if($response == "expired") {
echo "Your license has expired";
exit;
}
if($response == "suspended") {
echo "Your license has been suspended";
exit;
}
if($response == "none") {
echo "Are j00 stupid, you don't even have a license for this domain";
exit;
}
}
?>
Config.phpPHP Code:<?
// LockIT
// lock.php V1.0
include "config.php";
$server = $_GET[server];
$time = $_GET[time];
$serverq = mysql_query("SELECT * FROM license WHERE server='$server'");
$servern = mysql_num_rows($serverq);
if($servern == "0" || $servern == "") {
echo "none";
exit;
}
$licenseq = mysql_query("SELECT * FROM license WHERE server='$server' ORDER BY id DESC LIMIT 0,1");
$licenser = mysql_fetch_array($suspendq);
if($licenser[status] == "active") {
echo "active";
exit;
}else{
if($licenser[status] == "suspended") {
echo "suspended";
exit;
}
$today = date("r");
if($licenser[expire] == "$today") {
mysql_query("UPDATE license SET status='$suspended' WHERE id='$licenser[id]' LIMIT 0,1");
echo "expired";
exit;
}
}
?>
SQL:PHP Code:<?
// http://www.calebmingle.com
$server = "localhost";
$username = "";
$password = "";
$database = "";
mysql_connect($server, $username, $password);
?>
Sample license:PHP Code:CREATE TABLE `license` (
`id` int(10) NOT NULL auto_increment,
`server` text NOT NULL,
`expire` text NOT NULL,
`key` text NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;
Date should be in this format:PHP Code:INSERT INTO `license` VALUES (1, 'www.calebmingle.com', '', 'wafr5156dsf1a561');
Sat, 12 May 2007 19:58:08 -0500
Kind of confusing, but if your smart you should be able to figure it out.
I whipped it up kind of fast.
Want to hide these adverts? Register an account for free!