I found the serial number sample and I know how to make it work.
My question is though, how can I generate a serial using PHP on my server?
Serial Number Validation
-
- Posts: 904
- Joined: Thu Dec 22, 2005 7:03 pm
- Contact:
That's hardly an InstallAware question.
Candice Jones
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
-
- Posts: 29
- Joined: Fri Jan 16, 2009 11:56 am
- Location: Denmark
- Contact:
I have created a project that combines 2 of the samples provided with the product. The Serial Validation and the Online User Authentication.
I took the Serial Validation and modified it to include the online check. On my website I have a script like this that validates if the information sent is valid (you need to modify it to your own needs).
Hope this helps.
I took the Serial Validation and modified it to include the online check. On my website I have a script like this that validates if the information sent is valid (you need to modify it to your own needs).
Hope this helps.
Code: Select all
<?
$sql_host = ''; //add host information here (localhost, mysql.host.com, etc.)
$sql_un = ''; //add your user name here
$sql_pass = ''; //add your password here
$sql_db = ''; //add your database name here
$link = mysql_connect($sql_host, $sql_un , $sql_pass);
if (!$link)
{
die('Could not connect: ' . mysql_error());
}
else
{
$db_selected = mysql_select_db($sql_db , $link);
if (!$db_selected)
{
die ('Can\\'t use foo : ' . mysql_error());
}
else
{
if(get_magic_quotes_gpc())
{
$parm = stripslashes($_GET['parm']);
}
else
{
$parm = stripslashes($_GET['parm']);
}
if (isset($parm) )
{
$query_string = sprintf("SELECT * FROM `table` WHERE parm='%s''", mysql_real_escape_string($parm, $link));
$result = mysql_query($query_string, $link);
if (!$result)
{
die('Invalid query: ' . mysql_error());
}
else
{
$row = mysql_fetch_row($result);
//print("<BR>".$result);
if ($row)
{
print("OK\\n");
}
else
{
print("INVALID SERIAL 1");
}
}
}
else
{
print("INVALID SERIAL 2");
}
}
}
?>
-
- Posts: 904
- Joined: Thu Dec 22, 2005 7:03 pm
- Contact:
Thank you very much for sharing this with the InstallAware community!
Candice Jones
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
Who is online
Users browsing this forum: No registered users and 39 guests