02-28-2007 12:26 PM
OK, desparate people do desparate things:
I used the MS Network Monitor 3 to capture the GET command that IE7 uses to fetch the page. Here it is:
GET /index.htm HTTP/1.1
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, application/x-shockwave-flash, */*
Accept-Language: en-us
UA-CPU: x86
Accept-Encoding: gzip, deflate
If-Modified-Since: Fri, 23 Feb 2007 19:51:39 GMT; length=9515
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; .NET CLR 2.0.50727)
Host: www.invicis.com
Connection: Keep-Alive
I removed the gzip and If-Modified lines, and put this formatting into the "URL Get HTTP Document.vi" GET text formatting and all is magically just fine. I'll let those who actually understand this stuff figure out why this works (HTTP 1.1 vs 1.0?), but I'm off to tidy up the new vi and chase other bugs.
I'll post the replacement vi to this thread when complete. Thanks to all for your help!
02-28-2007 01:37 PM
02-28-2007 09:54 PM - edited 02-28-2007 09:54 PM
@Wiredup wrote:
"tbd", would you be so kind to save that vi IWebBrowser.vi as V7.0 or earlier (I'm not up to speed on LV Releases yet). I cannot find it by searching the forums.
Here you go!
While it's possible to extract the html text via this ActiveX control, it's much simpler to use Datasocket Read to grab a file/document. See attached.
Tried to open "URL Get Document.vi" - looks like it requires a few sub-VIs also from the Internet toolkit. You can use "File\Save with options" to save entire hierarchy into an LLB.
Cheers!
Message Edited by tbd on 02-28-2007 09:54 PM
03-01-2007 08:23 AM - edited 03-01-2007 08:23 AM
Message Edited by Wiredup on 03-01-2007 08:24 AM
Message Edited by Wiredup on 03-01-2007 08:26 AM
03-01-2007 08:32 AM
03-01-2007 08:43 AM
03-01-2007 09:49 AM
The 1.1 version I think is pretty compliant - although it uses little (only the bare mins) of the 1.1 protocol which forces the server to fall back to almost 1.0 protocol responses. It's biggest area of sketchiness is the reporting of the "user-agent". I just mimicked the IE7 user-agent text. There's probably better text to use here.
Maybe someone who's got some time (perhaps at NI) can work on this vi to make it a full-featured HTTP 1.1 URL document fetcher.
03-01-2007 01:57 PM
03-01-2007 06:25 PM
03-14-2007 12:32 PM