ola soy nuevo en este foro y tengo un problema son setup factory 7
he leido por la pagina de indigo rose que se puede validar un serial en un instalador por un script php y que te mande los detalles a tu email.
el codigo esta lleno de errores por lo que no me funciono a la primera hice algunos cambios y me funciono que lo validara pero no me llega ningun email a la cuenta que puse en el instalador.
y ahora lo mas dificil como puedo hacer que al validar el serial en la pagina web quede como utilizado y cuando se usa una vez ya no se puede usar mas????
gracias por adelantado.
 
ah el script que puse en el instalador y en la pagina web
 
he creado dos variables con texto llamadas UserName y UserSerial y en el boton next tengo el siguiente script:
 
-- Gets the username and serial from the text fields named UserName
-- And UserSerial.
sUsername = SessionVar.Expand("%UserName%");
sUserSerial = SessionVar.Expand("%UserSerial%");
 
-- Setup the data to be sent. (No md5 though)
sCheckScriptURL = "http://ualkman.webcindario.com/authenticate.php";
tValuesToPass = {reguser = sUsername, regserial = sUserSerial};
nSubmitMethod = SUBMITWEB_POST;
nTimeout = 20;
nPort = 80;
tAuthData = nil;
tProxyData = nil;
 
-- Just some simple stuff to set up
strProductName = SessionVar.Expand("%ProductName%");
-- Email address you want to receive the details on
strEmailTo = "[email protected]";
-- Location of the mail script to send the details out.
strURL = "http://ualkman.webcindario.com/mail.php";
 
-- System Variable Values About The User Passed For The Email
userinfo = System.GetUserInfo();
regowner = userinfo.RegOwner;
netdetails = System.GetLANInfo();
nicaddress = netdetails.NIC;
regorganization = userinfo.RegOrganization;
driveserial = Drive.GetInformation(_SourceDrive).SerialNumber;
time = System.GetTime(TIME_FMT_AMPM);
current_time = System.GetTime(1);
date = System.GetDate(DATE_FMT_EUROPE);
current_date = System.GetDate(2);
emailaddress = "strEmailTo";
 
-- Prepare the message to be sent
local strMessage = "";
strMessage = strMessage.."Product: "..strProductName.."\r\n";
strMessage = strMessage.."Name: "..SessionVar.Expand("%UserName%").."\r\n";
strMessage = strMessage.."Serial: "..SessionVar.Expand("%UserSerial%").."\r\n";
strMessage = strMessage.."Info: "..regowner.."\r\n";
strMessage = strMessage.."Mac Address: "..nicaddress.."\r\n";
strMessage = strMessage.."Reg Organization: "..regorganization.."\r\n";
strMessage = strMessage.."Drive Serial: "..driveserial.."\r\n";
strMessage = strMessage.."Registration Time: "..current_time.."\r\n";
strMessage = strMessage.."Registration Date: "..current_date;
 
 
 
local strSubject = "Registration for "..strProductName;
local strFrom = "[email protected]";
local strTo = strEmailTo;
 
-- Create the message data to be sent to the mail.php script:
local tblValues = {MailTo=strTo,MailFrom=strFrom,MailSubject=strSubj  ect,MailMessage=strMessage};
local nLastError = Application.GetLastError();
 
-- Show a dialog box while the persons details are being checked
StatusDlg.Show();
StatusDlg.ShowProgressMeter(false);
StatusDlg.SetTitle("Validating");
StatusDlg.SetStatusText("Please wait while your details are being checked with the server...");
--  Presto Send to the web and hide the activation dialog box
sResult = HTTP.Submit(sCheckScriptURL, tValuesToPass, nSubmitMethod, nTimeout, nPort, tAuthData, tProxyData);
local strResult = HTTP.Submit(strURL,tblValues,SUBMITWEB_POST);
StatusDlg.Hide();
 
 
 
-- The details were correct. (the installer received a value of one)
if sResult == "1" then
	-- The username and password was right
	Screen.Next();
else
	-- Those details provided were wrong. Or no longer in the database.
	Dialog.Message("ERROR", "Those details are invalid. Or they have been removed from the server", MB_OK, MB_ICONSTOP);
end
 
EN authenticate.php esto:
 
<?
 
// Returns '1' if details received are correct, or '0' if the details were incorrect
 
// Set the table of users
// Add some entries to the table "Username"=>"Serial"
// You must complete all entrie with a comma, except the last table entry(or it won't work)
$user_table = array(
    "ualkman"=>"PW10-7996",
    "NEVER"=>"9861-2206-4899-55662"
);
 
// Was data posted to the script?
if ($_POST)
{
    // Search through the table
    foreach($user_table as $UserName=>$UserSerial)
    {
        // Check if the details received via the installer are correct
        if (($_POST['reguser'] == ("$UserName")) AND ($_POST['regserial'] == ("$UserSerial")))
        {
            // The Details Were Correct And Authenticated, Then Send the result to the installer.
            echo '1';
            exit;
        }
    }
// The details supplied were not correct.Return the value of 0 to tell the installer to not let the install continue without the proper details
echo '0';
exit;
}
 
else
{
    // The script wasn't sent any post data by the installer. Or it was loaded through a web browser etc.
    echo "No Registration data found.";
}
 
?> 
 
EN mail.php ESTO:
 
<?php
 
// Send the details received from the users system to yuor email address you specified
 
$MessageNoSlashes = stripslashes($Message);
$SubjectNoSlashes = stripslashes($Subject);
 
mail(    "$To",
        "$SubjectNoSlashes",
        "$MessageNoSlashes",
        "From: $From\r\n"
        ."Reply-To: $From\r\n");
?>
 
Ojala alguno de ustedes pueda decirme como se hacen estas dos cosas porfavor y que errores hay. Gracias de antemano 
   
 

