Jump to content
lordsocke

Count links in a txt file

Recommended Posts

doubt away, its what i am here for.

neowin.net is an example of a server that hosts a page, but blocks icmp requests or they are blocked along the way.

 

#include <Inet.au3>

msgbox(0, '' , _IsAvailablePingOnly("neowin.net"))
msgbox(0, '' , _IsAvailableWithSrcCheck("neowin.net"))

Func _IsAvailablePingOnly($sURL)
    $sOut = "False"
    If ping($sURL) > 1 Then $sOut = "True"
    return $sOut
EndFunc



Func _IsAvailableWithSrcCheck($sURL)
    $sOut = "False"

If ping($sURL) = 0  Then
    $sSource = _inetgetsource($sURL)
    If @extended > 0 Then $sOut = "True"
Else
        $sOut = "True"
EndIf

return $sOut

EndFunc

 

Edited by boththose
accuracy

,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-.
|(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/
(_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_)
| | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) (
| | | | |)| | \ / | | | | | |)| | `--. | |) \ | |
`-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_|
'-' '-' (__) (__) (_) (__)

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

×
×
  • Create New...