Rob van der Woude's Scripting Pages
Powered by GeSHi

Source code for wanip.vbs

(view source code of wanip.vbs as plain text)

  1. Option Explicit
  2.  
  3. Dim objRequest, strMsg
  4.  
  5. If WScript.Arguments.Count > 0 Then Syntax
  6.  
  7. Set objRequest = CreateObject( "Microsoft.XMLHTTP" )
  8.  
  9. objRequest.open "GET", "http://www.robvanderwoude.com/wanip.php", False
  10. objRequest.send vbNull
  11.  
  12. WScript.Echo objRequest.responseText
  13.  
  14. Set objRequest = Nothing
  15.  
  16.  
  17. Sub Syntax( )
  18. 	strMsg = "WANIP.vbs, Version 2.00" _
  19. 	       & vbCrLf _
  20. 	       & "Display your WAN IP address" _
  21. 	       & vbCrLf & vbCrLf _
  22. 	       & "Usage:  CSCRIPT.EXE  //NoLogo  WANIP.VBS" _
  23. 	       & vbCrLf & vbCrLf _
  24. 	       & "Original idea: Isaac Zelf" _
  25. 	       & vbCrLf _
  26. 	       & """Translated"" to VBScript by Rob van der Woude" _
  27. 	       & vbCrLf _
  28. 	       & "http://www.robvanderwoude.com"
  29. 	WScript.Echo strMsg
  30. 	WScript.Quit 1
  31. End Sub
  32.  

page last uploaded: 2017-07-06, 12:37