Login | |
|
 |
RE: Read a web page from a script - 2/2/2006 7:44:46 AM
|
|
 |
|
| |
kirrilian
Posts: 628
Score: 3
Joined: 3/15/2005
From:
Status: offline
|
check out the MSXML2.XMLHTTP object here is an example: getURL "http://www.google.com" Sub getURL(url) Set objHTTP = CreateObject("MSXML2.XMLHTTP") WScript.Echo "********** start **************" Call objHTTP.Open("GET", url, FALSE) 'WScript.Echo objHTTP.readyState objHTTP.Send 'WScript.Echo objHTTP.readyState WScript.Echo "request returned status: " & objHTTP.status 'uncomment the Next line if you want to see the actual source of the file WScript.Echo(objHTTP.ResponseText) WScript.Echo "********** End **************" WScript.Echo End Sub
_____________________________
Have you searched here ? VBScript Fundamentals My Site
|
|
| |
|
|
|
 |
RE: Read a web page from a script - 2/3/2006 1:57:50 AM
|
|
 |
|
| |
kirrilian
Posts: 628
Score: 3
Joined: 3/15/2005
From:
Status: offline
|
youre going to have problems with that part of it, i couldnt ever get authentication to work reliably using that object. you can try it though, change your url to reflect the login eg. getURL "http://kirrilian:password@www.google.com"
_____________________________
Have you searched here ? VBScript Fundamentals My Site
|
|
| |
|
|
|
 |
RE: Read a web page from a script - 2/17/2006 2:30:25 AM
|
|
 |
|
| |
kirrilian
Posts: 628
Score: 3
Joined: 3/15/2005
From:
Status: offline
|
quote:
ORIGINAL: skione quote:
ORIGINAL: kirrilian youre going to have problems with that part of it, i couldnt ever get authentication to work reliably using that object. you can try it though, change your url to reflect the login eg. getURL "http://kirrilian:password@www.google.com" I know this is a triple post but I found out how to passa a username/password use the following: Call objHTTP.Open("GET", url, FALSE, strUserName , strPassword) excellent! I've been looking for a way to do that for some time. Thanks!
_____________________________
Have you searched here ? VBScript Fundamentals My Site
|
|
| |
|
|
|
 |
RE: Read a web page from a script - 2/17/2006 2:43:16 AM
|
|
 |
|
| |
kirrilian
Posts: 628
Score: 3
Joined: 3/15/2005
From:
Status: offline
|
I have posted a subroutine in the "post a script" section that works with authenticated http, now if i could just get it to work with ftp as well...
_____________________________
Have you searched here ? VBScript Fundamentals My Site
|
|
| |
|
|
|
|
|