Hallo KDeluxe!
Ich habe mir mal erlaubt, dein Script zu verbessern, ich hoffe das ist ok ;)
Und zwar habe ich Inetread mit Funktionen aus der WinHttp.au3 ersetz - es ist jetzt ca. 10x schneller im Laden der HWID-Daten
Code:
#include-once
#include <Winhttp.au3>
;=================================================================================================
; Function: _GetHWIDData($HWID = 0)
; Description: Checks the HWID and returns an array containing the user related informations
; Return Value(s): On Success - Returns an array containing the user related informations.
; On Failure - Returns false
; @Error - 1 = Failed to get the HWID.
; 2 = Failed to connect to the internet.
; 3 = Failed to categorize the information.
; Author(s): KillerDeluxe
; Modified : Achat
; Remark(s): The array returned is made up as follows:
; $Array[0] = userid
; $Array[1] = username
; $Array[2] = joindate
; $Array[3] = posts
; $Array[4] = thanks
; $Array[5] = usergroup
;=================================================================================================
Func _GetHWIDData($HWID = 0)
Local $ReturnData[6], $URL = "api/hwid.php?hash="
If $HWID == 0 Then
$HWID = _GetHWID()
If @error Then Return SetError(1, "", False)
EndIf
#region Speed improvements by Achat (www.elitepvpers.com)
$hSession=_WinHttpOpen()
$hConnect=_WinHttpConnect($hSession,'www.elitepvpers.com')
$Source=_WinHttpSimpleRequest($hConnect,'GET',$URL&$HWID)
_WinHttpCloseHandle($hConnect)
_WinHttpCloseHandle($hSession)
#endregion
If @error Then Return SetError(2, "", False)
$Info = StringRegExp($Source, "<.*?>(.*?)</.*?>", 3)
If @error Then Return SetError(3, "", False)
For $i = 0 To 5
$ReturnData[$i] = $Info[$i]
Next
Return $ReturnData
EndFunc
MfG