Sign in to follow this  
Followers 0
Wolfshare

Check Ip if it's listed

3 posts in this topic

#1 ·  Posted (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 by Wolfshare

Share this post


Link to post
Share on other sites



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.

Share this post


Link to post
Share on other sites

Tried, not sucess, going to pay someone who will help me to solve this... PM me if anyone intrested.

Payout method: Paypal.

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  
Followers 0