Jump to content

Check Ip if it's listed


Recommended Posts

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 by Wolfshare
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...