|
Basically I get a number of error when I upload the script, this is due to the domain license I add to the script, (this is generated automatically)
This is a copy of the generated code which provides me a domain license system, once I chomd the relevent files the errors go away:
// PLEASE DO NOT EDIT BELOW
// PLEASE DO NOT EDIT BELOW
// PLEASE DO NOT EDIT BELOW
function p($b,$e,$m) {
$a = 1;
$i = 0;
$b2 = $b;
while (($e >> $i)>0) {
if ((($e >> $i) & 1) == 1) {
$a = mo(($a * $b2) , $m);
}
$b2 = mo(($b2 * $b2) , $m);
$i++;
}
return $a;
}
function mo ($g, $l) {
return $g - ($l * floor ($g/$l));
}
function d($c, $d, $n) {
$da = split(" ", $c);
for ($u=0; $u<count ($da); $u++) {
if ($da[$u] == "") {
array_splice($da, $u, 1);
}
}
for ($u=0; $u< count($da); $u++) {
$rm = p($da[$u], $d, $n);
$de.= substr ($rm, 1, strlen($rm)-2);
}
for ($u=0; $u<strlen($de); $u+=2) {
$rd .= chr(substr ($de, $u, 2) + 30);
}
return $rd;
}
// YOU CAN EDIT THE TEXT BELOW
// YOU CAN EDIT THE TEXT BELOW
// YOU CAN EDIT THE TEXT BELOW
$E = array("Your license has expired! Please contact the vendor to purchase a script or resolve any issues.","You don't have a license for this script! Please contact the vendor to purchase a script or resolve any issues.","The activation could not be contacted. Please check that your server has access to external HTTP servers, or contact email removed with your site's URL and the name of the product and vendor.");
// PLEASE DO NOT EDIT BELOW
// PLEASE DO NOT EDIT BELOW
// PLEASE DO NOT EDIT BELOW
$n=49657723;
$k=26670337;
$v=12;
$p=61;
$h = str_replace("www.","",$_SERVER["HTTP_HOST"]);
if(file_exists($v."_".$p.".key"))
{
$f=fopen($v."_".$p.".key","r");
fseek($f,0);
$data = d(fread($f,1000),$k,$n);
fclose($f);
}
else
{
$data = "";
}
$dm = substr($data,0,32);
$time = intval(substr($data,32));
if(time()-date("Z",time()) > $time || md5($h) != $dm)
{
$cu=curl_init("http://www.electrifire.co.uk/validate.php/$h/$v/$p");
curl_setopt($cu,CURLOPT_RETURNTRANSFER, 1);
$newkey = curl_exec($cu);
if($newkey == "EXPIRED")
{
$licerror = $E[0];
}
elseif($newkey == "INVALID")
{
$licerror = $E[1];
}
if(!$licerror)
{
$f=fopen("$v"."_$p.key","w");
fwrite($f,$newkey);
}
}
if($licerror)
{
die($licerror);
}
I have 2 files in the script called:
11_54.key
11_57.key
Thes both need permissions of 777 otherwise I get errors and I've currently got this error:
Warning: Invalid argument supplied for foreach() in /home/videotom/public_html/Plugins.class.php(1) : eval()'d code(1) : eval()'d code on line 109
The generated code is added at the top of the plugins.class filewhich I have set to 777 to try and clear this error, normally what I have just explained clears all errors but not this time. sorry for the long post but hope this helps someone explain my error
Last edited by fattony; 01-23-2009 at 02:59 PM..
|