RyGoTypE Posted May 22, 2008 Share Posted May 22, 2008 I was looking through the SQL information, and I was wondering if it is possible to connect to a database on a webserver. http://www.shizzkabiz.com/ Link to comment Share on other sites More sharing options...
evilertoaster Posted May 22, 2008 Share Posted May 22, 2008 (edited) It's no different from connecting to a SQL instance on any other type of server so long as some sort of SQL server is installed. Edited May 22, 2008 by evilertoaster Link to comment Share on other sites More sharing options...
RyGoTypE Posted May 22, 2008 Author Share Posted May 22, 2008 How would I go about connecting via autoit script to a mysql database on my webserver? I've searched topics and example scripts... I'm lost. http://www.shizzkabiz.com/ Link to comment Share on other sites More sharing options...
PsaltyDS Posted May 22, 2008 Share Posted May 22, 2008 How would I go about connecting via autoit script to a mysql database on my webserver? I've searched topics and example scripts... I'm lost.MySQL UDFsSearch cat is... unimpressed with your search skilz. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
RyGoTypE Posted May 22, 2008 Author Share Posted May 22, 2008 I was actually looking at this post a little bit ago. I tried everything he/she had said to do, but I get the following error. >Running AU3Check (1.54.10.0) from:C:\Program Files\AutoIt3 +>17:36:50 AU3Check ended.rc:0 >Running:(3.2.10.0):C:\Program Files\AutoIt3\autoit3.exe "F:\Autoit\mysql connect.au3" F:\Autoit\mysql.au3 (30) : ==> The requested action with this object has failed.: $ObjConn.open ("DRIVER=" & $sDriver & ";SERVER=" & $sServer & ";DATABASE=" & $sDatabase & ";UID=" & $sUsername & ";PWD=" & $sPassword & ";PORT=" & $iPort) $ObjConn.open ("DRIVER=" & $sDriver & ";SERVER=" & $sServer & ";DATABASE=" & $sDatabase & ";UID=" & $sUsername & ";PWD=" & $sPassword & ";PORT=" & $iPort)^ ERROR http://www.shizzkabiz.com/ Link to comment Share on other sites More sharing options...
PsaltyDS Posted May 22, 2008 Share Posted May 22, 2008 I was actually looking at this post a little bit ago. I tried everything he/she had said to do, but I get the following error. >Running AU3Check (1.54.10.0) from:C:\Program Files\AutoIt3 +>17:36:50 AU3Check ended.rc:0 >Running:(3.2.10.0):C:\Program Files\AutoIt3\autoit3.exe "F:\Autoit\mysql connect.au3" F:\Autoit\mysql.au3 (30) : ==> The requested action with this object has failed.: $ObjConn.open ("DRIVER=" & $sDriver & ";SERVER=" & $sServer & ";DATABASE=" & $sDatabase & ";UID=" & $sUsername & ";PWD=" & $sPassword & ";PORT=" & $iPort) $ObjConn.open ("DRIVER=" & $sDriver & ";SERVER=" & $sServer & ";DATABASE=" & $sDatabase & ";UID=" & $sUsername & ";PWD=" & $sPassword & ";PORT=" & $iPort)^ ERROR The default driver is "{MySQL ODBC 3.51 Driver}". Do you have that loaded? If you have a different version loaded, you'll have to specify it in the _MySQLConnect() parameters. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
RyGoTypE Posted May 22, 2008 Author Share Posted May 22, 2008 Yeah, I did all of that correctly. I found the problem. My host wasn't allowing Remote MySQL and now it is. Thank you for all your help. http://www.shizzkabiz.com/ Link to comment Share on other sites More sharing options...
RyGoTypE Posted May 22, 2008 Author Share Posted May 22, 2008 heh okay, now. I want to login to my website with this script. Check the database if the username is valid and check if the password is valid. If it is INVALID pop up saying invalid username/password combination. and exit script. If it is valid, pop up saying Success! and continue script. http://www.shizzkabiz.com/ Link to comment Share on other sites More sharing options...
RyGoTypE Posted May 23, 2008 Author Share Posted May 23, 2008 I was just informed that it is a bad idea to connect through MySQL in a program. "database password can be extracted and someone will delete your db hex editing a program looking at it, its compiled in there, it can be found" and I was informed to ... "make a php script on your side, and just have your program talk to the script using GET/POST thru HTTP" is this do-able? http://www.shizzkabiz.com/ Link to comment Share on other sites More sharing options...
PsaltyDS Posted May 23, 2008 Share Posted May 23, 2008 I was just informed that it is a bad idea to connect through MySQL in a program."database password can be extracted and someone will delete your dbhex editing a program looking at it, its compiled in there, it can be found"and I was informed to ..."make a php script on your side, and just have your program talk to the script using GET/POST thru HTTP"is this do-able?If you want to do HTTP without launching a full browser, you could use HTTP.au3 (which may need some tweaking). Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
RyGoTypE Posted May 26, 2008 Author Share Posted May 26, 2008 k well first of all, I am back from my long memorial day weekend. How was your weekend? I made my switch over from MySQL to HTTP, but now I can't seem to get this to work. I'll post what I have and see if it's any help. I'm trying to make a GUI with a User and Password with a login button. Open the GUI , fill out the user and password and click login. After clicking login, I want it to take the text from the user box and stick it in the proper part of the string and same with the password and then send it to the server and login. here's what I have so far... #include <GUIConstants.au3> #include <String.au3> #include <GuiListView.au3> #include <HTTP.au3> ; GUI GuiCreate("Pdub - Login", 260, 130) ; Creates the username box $InputUser = GuiCtrlCreateInput('',80,30,150,20, 0) ; Creates the password box with blured input $InputPass = GuiCtrlCreateInput('',80,55,150,20, 0x20) ; BUTTON $Login = GuiCtrlCreateButton("Login", 100, 85, 100, 30) $host = "www.shizzkabiz.com" $page = "/login.php" $vars = "username=" & $InputUser & "&userpass=" & $InputPass & "&form_id=myform&userlogin" $url = $page&"?"&_HTTPEncodeString($vars) $socket = _HTTPConnect($host) $get = _HTTPGet($host,$url,$socket) $recv = _HTTPRead($socket,1) ConsoleWrite("Data received:"&@CRLF&$recv&@CRLF) GUISetState () While 1 $msg = GUIGetMsg() If $msg = $Login Then _HTTPPost($host, $page, $socket, $vars) If $msg = $GUI_EVENT_CLOSE Then ExitLoop WEnd http://www.shizzkabiz.com/ Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now