Page 1 of 1 1
Topic Options
#166573 - 2006-08-30 08:26 AM Can't get ReadHTML() , GetPage() or GetURL() to work...
Viggen Offline
Starting to like KiXtart

Registered: 2002-03-22
Posts: 110
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

Top
#166574 - 2006-08-30 11:12 AM Re: Can't get ReadHTML() , GetPage() or GetURL() to work...
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11623
Loc: CA
Not sure why but it doesn't work for me either. Neither does GetURL

However, FTPget() does work for me.

Top
#166575 - 2006-08-30 12:41 PM Re: Can't get ReadHTML() , GetPage() or GetURL() to work...
Viggen Offline
Starting to like KiXtart

Registered: 2002-03-22
Posts: 110
Thanx!

The thought of downloading the file first, never crossed my mind...

Works fine now.

Top
#166576 - 2006-08-31 12:41 AM Re: Can't get ReadHTML() , GetPage() or GetURL() to work...
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
btw, nice to see you still remembered your old account info...
Top
#166577 - 2006-08-31 01:57 AM Re: Can't get ReadHTML() , GetPage() or GetURL() to work...
Viggen Offline
Starting to like KiXtart

Registered: 2002-03-22
Posts: 110
Yea...
been away from kixin' way too long
(had som family issues that needed alot of my attention)

It was nice to see that my account still existed

Top
Page 1 of 1 1


Moderator:  Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 84 anonymous users online.
Newest Members
gespanntleuchten, DaveatAdvanced, Paulo_Alves, UsTaaa, xxJJxx
17864 Registered Users

Generated in 0.053 seconds in which 0.024 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org