Hi All!
I have tried to use the different functions and I get the same strange result...
If I take this url: "http://www.geocaching.com/seek/cache_details.aspx?wp=GCHVGX"
and paste it into IE it will display a page, but if I use any of the functions, I get nothing?
If I shorten the url to: "http://www.geocaching.com/seek/cache_details.aspx?wp=GCHVG"
IE will display an error-page, and the fuctions work as they suppose to do??
this is my simple testscript
Code:
$html = GetPage('http://www.geocaching.com/seek/cache_details.aspx?wp=GCHVGX')
? $html
FUNCTION GetPage($URL)
DIM $HTML, $IECacheKey, $IECacheVal
$IECacheKey = "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings"
$IECacheVal = READVALUE($IECacheKey, "SyncMode5")
IF $IECacheVal <> 3
$nul = WRITEVALUE($IECacheKey, "SyncMode5", "3", "REG_DWORD")
ENDIF
$HTML = CREATEOBJECT("microsoft.XMLhttp")
$HTML.Open("GET", $URL, NOT 1)
$HTML.Send
IF $HTML.Status = 200
$GetPage = $HTML.ResponseText ;or ResponseBody
ELSE
$GetPage = "HTTP Status Code: " + $HTML.Status + " (" + $HTML.StatusText + ")"
EXIT 1
ENDIF
$nul = WRITEVALUE($IECacheKey, "SyncMode5", $IECacheVal, "REG_DWORD")
ENDFUNCTION
I only changed the functions between the tests.
I guess there's an obvious reason to why this isn't working, but I can't wrap my head around it
/Viggen