vb script

Author Message
vimalvjoseph

  • Total Posts : 24
  • Scores: 0
  • Reward points : 0
  • Joined: 7/28/2011
  • Status: offline
vb script Saturday, July 30, 2011 11:09 PM (permalink)
0
hey guys need a help too... i have a website ... but i frequently get network errors or 404 errors... i just need to check links and throw message to ma mail....some pages have internal searches ...so hav written a vbscript but it doesn throw mail... and its not checking internal links..... can any one help me with this....
 
#1
    ebgreen

    • Total Posts : 8228
    • Scores: 98
    • Reward points : 0
    • Joined: 7/12/2005
    • Status: online
    Re:vb script Sunday, July 31, 2011 4:54 PM (permalink)
    0
    You will need to give details and show the code that you have written so far.
    "... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
    Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
    http://www.visualbasicscript.com/m_47117/tm.htm
     
    #2
      vimalvjoseph

      • Total Posts : 24
      • Scores: 0
      • Reward points : 0
      • Joined: 7/28/2011
      • Status: offline
      Re:vb script Sunday, July 31, 2011 7:32 PM (permalink)
      0

      strTextFile = "url.txt"
      Set objFSO = CreateObject("Scripting.FileSystemObject")
      strData = objFSO.OpenTextFile(strTextFile,ForReading).ReadAll
      arrLines = Split(strData,vbCrLf)
      For Each strLine in arrLines
      strwebsite= strLine
      If PingSite( strWebsite ) Then
          WScript.Echo  strWebsite & " is Running!"
      Else
          WScript.Echo  strWebsite & " is down!"
      End If
      Next
      Set objFSO = Nothing
      Function PingSite( myWebsite )
          Dim intStatus, objHTTP
          Set objHTTP = CreateObject( "WinHttp.WinHttpRequest.5.1" )
          objHTTP.Open "GET", "https://" & myWebsite & "/", False
          objHTTP.SetRequestHeader "User-Agent", "internetexplorer (compatible; MyApp 1.0; Windows NT 5.1)"
         On Error Resume Next
          objHTTP.Send
          intStatus = objHTTP.Status
          On Error Goto 0
          If intStatus = 200 Then
              PingSite = True
          Else
              PingSite = False
          End If
          Set objHTTP = Nothing
      End Function
       
      #3

        Online Bookmarks Sharing: Share/Bookmark

        Jump to:

        Current active users

        There are 0 members and 1 guests.

        Icon Legend and Permission

        • New Messages
        • No New Messages
        • Hot Topic w/ New Messages
        • Hot Topic w/o New Messages
        • Locked w/ New Messages
        • Locked w/o New Messages
        • Read Message
        • Post New Thread
        • Reply to message
        • Post New Poll
        • Submit Vote
        • Post reward post
        • Delete my own posts
        • Delete my own threads
        • Rate post

        2000-2012 ASPPlayground.NET Forum Version 3.9