Sign in to follow this  
Followers 0
GreYFoX

Simple check script

1 post in this topic

#1 ·  Posted (edited)

i need a function/script

that wouldn't use external softwares but the original script....

i need it to check if www.myweb.com/file.ext exist or no

and return 1 for exist

return 403 or what ever error code for else

anything similar

Note, i don't need to open the page

just need to check if it exists or not

and i don't want any other processes executed.

thanks

answered it my self thanks

#include <HTTP.au3>
#include <IE.au3>
$host = "www.myweb.com"
$page = "/file.ext"
$socket = _HTTPConnect($host)
$get = _HTTPGet($host, $page, $socket)
$recv = _HTTPRead($socket,1)
If @error Then
    MsgBox(0,"Fatal Error!","Please make sure you are properly conected to the Internet")
    Else
    If $recv[0]=200 Then
        MsgBox(0,"File found","Congratz",10)
        $O_IEnew = _IECreate("www.myweb.com/file.ext")
        Exit

......................u all know the rest not complete code

thanks to http://www.autoitscript.com/forum/index.php?showtopic=29631

Edited by GreYFoX

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