Jump to content
Sign in to follow this  

between au3 and php, COM, mysql

Recommended Posts



I`d need some help on passing the variables from my desktop application (compiled au3.exe file) to my web server auth script (.php) and vice versa for auth purposes.

I have never done anything similar and I was trying to figure out all day today how to do this. COM is brand new to me totaly as you can see, and I would really appreciate some guidance about how to tackle this problem.

I have managed to get some things working, like getting username from mysql database, but I cant pass the $var values from my desktop application to my .php script. In an essence, .php should compare username, password, ip address and hardware ID (still figuring that out)from my au3 file with mysql database, and act accordingly.The following code is messy, and not workable atm, but I need to get some sleep now, and hopefully someone will be able to point me into the right direction in next few hours.

Thank you.

au3 file:

$oRet = _HTTPRequest('POST', 'http://www.mysite.com/file.php', 'zdvfsdf')
$id = "testuser"
$pw = "pass"
$hid = "testHID"
$ip = "Ipaddress"
$oData = "some data here for testing"
Func _HTTPRequest($oMethod, $oURL, $oData)
    Local $oHTTP = ObjCreate("winhttp.winhttprequest.5.1")
    $oHTTP.Open($oMethod, $oURL, False)
    If $oMethod = "POST" Then $oHTTP.SetRequestHeader("Content-Type", "application/x-www-form-urlencoded")
    $oHTTP.Send($oData);error out requested
    Return $oHTTP.ResponseText

server script:

$passuser='';//COM object
$iduser='';//COM object

@mysql_select_db($database) or die( "Unable to select database, Let admins know immediately!");
$query="SELECT * FROM user WHERE username=$iduser And password=$passuser";


//echo "<b><center>Database Output</center></b>";

while ($i < $num) {

$hash=md5(md5($string) . $salt);

//echo "<b>$first</b><br>";
//echo "<b>$last</b><br>";
//echo "<b>$salt</b><br>";
//echo "<b>$hash</b><br>";


Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this