Credits Not To Me : This Is Just An Example!
Code:
void Check()
{
char server[1024] = "127.0.0.1";
char path[1024];
aSprint_f(path,"/test/auth.php?hwid=%d",HWIDGEN());
HINTERNET hSession = InternetOpenA("Microsoft Internet Explorer", INTERNET_OPEN_TYPE_DIRECT, NULL, NULL, NULL);
HINTERNET hConnection = InternetConnectA(hSession,server,INTERNET_DEFAULT_HTTP_PORT,NULL,NULL,INTERNET_SERVICE_HTTP,NULL,NULL);
HINTERNET hRequest = HttpOpenRequestA(hConnection,NULL,path,NULL,NULL,NULL,NULL,NULL);
HttpSendRequestA(hRequest,NULL,NULL,NULL,NULL);
DWORD dwNumberOfBytesAvailable = 0;
InternetQueryDataAvailable(hRequest,&dwNumberOfBytesAvailable,0,0);
if (dwNumberOfBytesAvailable > 0)
{
char* pBuffer = new char[dwNumberOfBytesAvailable + 1];
pBuffer[dwNumberOfBytesAvailable] = 0;
DWORD dwBytesRead = 0;
InternetReadFile(hRequest,pBuffer,dwNumberOfBytesAvailable,&dwBytesRead);
if(strstr(pBuffer,"None"))
{
//do...
}
delete [] pBuffer;
}
InternetCloseHandle(hRequest);
InternetCloseHandle(hConnection);
InternetCloseHandle(hSession);
}
[php]
<?php
mysql_connect("127.0.0.1","root","");
mysql_select_db("yourdb");
$hwid = $_GET["hwid"];
if(empty($hwid))
{
die("Error");
}
else
{
$query = "SELECT * FROM auth WHERE hwid = '$hwid'";
$query = mysql_query($query);
while($row = @mysql_fetch_object($query))
{
$array = explode("-",$row->time);
if(date('Y') <= $array[0] && date('m') <= $array[1] && date('d') <= $array[2])
die("None");
else
die("Error");
}
die("Error");
}
?>
[/php]
Small Protection,easy to crack, just an example
For all those guys trying to include this in their vip hax:
modify host files, create a php file that echos None and ur done
If you are to silly to set up the DB, dont use this.