inet.openurl is not fetching the correct html source

lalchetian
08-08-2009, 06:42 AM
Function GetHTMLPage(Inet1 As INet, ByVal url As String, ByVal filename As String, ByVal proxy As String) As String
Dim fnum As Integer
On Error GoTo errorfetch
INet.Cancel
INet.proxy = proxy
errorfetch:
nme = Form1.Caption
GetHTMLPage = Inet1.OpenURL(url)
If Inet1.StillExecuting = True Then
DoEvents
End If
Form1.Caption = nme
fnum = FreeFile
Open filenamehtml + filename For Output As #fnum
Print #fnum, GetHTMLPage
Close #fnum
End Function


http://www.arzt-auskunft.de/Arzt-Auskunft/Suche/suche_s/DataDetail.plx?EntryIdExStat=a6414x66911h8i8048896991776&DbNr=1&
http://www.arzt-auskunft.de/Arzt-Auskunft/Suche/suche_s/DataDetail.plx?EntryIdExStat=a7416k30831p2yso7o454360955865&DbNr=1&
http://www.arzt-auskunft.de/Arzt-Auskunft/Suche/suche_s/DataDetail.plx?EntryIdExStat=a8615u63982o50252132y624210&DbNr=1&
http://www.arzt-auskunft.de/Arzt-Auskunft/Suche/suche_s/DataDetail.plx?EntryIdExStat=a22113x9911c4a9g837v996928198&DbNr=1&
http://www.arzt-auskunft.de/Arzt-Auskunft/Suche/suche_s/DataDetail.plx?EntryIdExStat=a91139u0990s962463662823q97&DbNr=1&

now the problem is It actually fetches the html but not of the same url as passed in the argument but of some different url . I can say this coz i save the html and when i open it in browser the page format is same but its not of the url requested. the code is simple enough and i have been trying to figure it out for a week now
any sort of help/alternatives would be highly appreciated

Cerian Knight
08-09-2009, 12:56 AM
Try using a unique filename each time and/or flushing your browser cache.

lalchetian
08-09-2009, 03:35 AM
I had IE8 i uninstalled it which would automatically install ie7 but no difference....

lalchetian
08-09-2009, 03:38 AM
filename is indeed different every time and i went into uninstall IE8 which would automatically install ie7 but all to no avail

Cerian Knight
08-09-2009, 01:20 PM
For diagnostic purposes, instead of writing GetHTMLPage to a file, try writing it to a multiline TextBox on your form so you can inspect the HTML source directly. You might also try using OpenUrl with the parameter icByteArray. However, none of this should make a difference.

I wonder why you are using 'Inet1 As Inet'? Are you manually instantiating Inet, since simply adding Inet to your form would have given you Inet1? Beyond that, you are referring to both Inet and Inet1 in your code, which seems incorrect to me.

I also wonder why you are using .StillExecuting with DoEvents in an If...Then check, instead of the usual Do...Loop? I wouldn't think .StillExecuting would be needed in this context, anyway. You are using SP6 with VB6, since it might correct some issues that might make you think you need to use .StillExecuting? Not sure.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum