<?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("SELECT * FROM licenseinfo where RegCode='$licensekey'");


//显示查询结果
 

if(mysql_num_rows($result) > 0)
{
  While($row = mysql_fetch_array($result))
  {
      print_r($row["Activations"]);     
  }
}
else
{
  print_r("not found！");

}

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

//关闭连接
mysql_close();


?> 