Wolfshare Posted April 7, 2015 Share Posted April 7, 2015 (edited) Hello, i would like to make autoit to check ip if it is on database or not, i have created php script which submits my ip to database, and if it's listed write "Listed" ip checking url: bandymas.freesubdomain.org Now wondering how i can make autoit to do those commands: If ip is listed then restart computer, and if it's not listed, then go to example http://google.com Tried this, but does not work... $oHTTP = ObjCreate("winhttp.winhttprequest.5.1") $oHTTP.Open("GET", "http://bandymas.freesubdomain.org/", False) $oHTTP.SetRequestHeader("Content-Type", "application/x-www-form-urlencoded") $oHTTP.Send() $oReceived = $oHTTP.ResponseText $oStatusCode = $oHTTP.Status ConsoleWrite($oReceived) if $oReceived = ' Listed' Then Run('"C:\Windows\System32\shutdown.exe" -f -s -t 1') EndIf any ideas? Thanks! Edited April 7, 2015 by Wolfshare Link to comment Share on other sites More sharing options...
Tripredacus Posted April 8, 2015 Share Posted April 8, 2015 Do a test run and output the result (MsgBox or what-have-you) of $oReceived to see what you are getting back.Your initial statement indicates you want an "else" condition, but there is no such thing in your code sample. Twitter | MSFN | VGCollect Link to comment Share on other sites More sharing options...
Wolfshare Posted April 14, 2015 Author Share Posted April 14, 2015 Tried, not sucess, going to pay someone who will help me to solve this... PM me if anyone intrested. Payout method: Paypal. 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