Jump to content

check for remote file and stop execution if it doesnt exist.


Recommended Posts

i want a remote kill switch in one of my scripts.

i figured the easiest way is to check for a file on a website and if its no longer there to just end.

$exists = InetGet("http://www.mydomain.com", "kill.txt", 1, 0)
If $exists = 0 Then
    MsgBox(0, "Registration Failed", "Registration Failed")

    Else
ENDIF

im sure im doing it wrong because it dont work.

just not sure what im doing wrong.

Link to comment
Share on other sites

$size = InetGetSize("http://www.mydomain.com/kill")
If $size <> 4 Then
    MsgBox(0, "Verification Failed", "Verification Failed")
    Exit
    Else
    ENDIF

that works checking the size.

id still appreciate if anyone knows a better way of doing this.

Edited by supadodger
Link to comment
Share on other sites

  • Developers

id still appreciate if anyone knows a better way of doing this.

It all depends what the real porpose is of all of this, because in general its not really apreciated by many when you connect to an Internetsite without informing the user of the program.

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

It all depends what the real porpose is of all of this, because in general its not really apreciated by many when you connect to an Internetsite without informing the user of the program.

Jos

im making someone a script to automate something they do repeatedly online that usually takes them an hour.

the script is actually done but he wants to "try it out" before he pays me.

i want to be able to kill it if he doesnt pay.

that way he cant take it and not pay me.

Link to comment
Share on other sites

  • Developers

Sounds like a good trust relation to do business.

Whatever you do there is a way to get around it.

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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...