<?php

//插入序列号到数据库
if( isset($_GET['key']) )
{ 
 $licensekey = $_GET['key'];    
}

//连接MySQL
$conn = @mysql_connect("localhost", "gili0512", "Jg4GS97gWVSw");

if($conn == FALSE)
{	
	print_r("failed to connect!");
	exit;
}

//选择数据库
mysql_select_db("gili0512_usb_stick_encryption");

//执行SQL
$result = @mysql_query("INSERT INTO licenseinfo(id, RegCode, Activations,IsExpired) VALUES (0, '$licensekey', 0,0)");

//显示查询结果
if ($result)
{
  print_r("success");
}
else
{
  print_r("failed");
}


//释放结果集
mysql_free_result($result);

//关闭连接
mysql_close();


?> 
