Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers AppGameKit Corner / How to download web page?

Author
Message
hakimfullmetal
9
Years of Service
User Offline
Joined: 17th Feb 2015
Location:
Posted: 15th Jul 2016 06:35
Hello everybody.

Anybody knows how we can download a whole web page using AppGameKit?
Can we use HTTP command? Or do we need something else?

I wanted to download a webpage using AppGameKit, then parse through it.
But all I can find is a command to GetHTTPFile.

Any idea?
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
hakimfullmetal
9
Years of Service
User Offline
Joined: 17th Feb 2015
Location:
Posted: 15th Jul 2016 08:58
Looks like SendHTTPRequestASync( iHTTP, szServerFile ) can only request specific files from a website.
Can it also download the whole webpage? I can't find a way

AGK can't call DLL, so i can't download webpages using urlmon.dll...
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 16th Jul 2016 12:10
Quote: "Looks like SendHTTPRequestASync( iHTTP, szServerFile ) can only request specific files from a website."

You can request the HTML file.
If it is dynamic (e.g PHP), you will get the final output sent as a file.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt
hakimfullmetal
9
Years of Service
User Offline
Joined: 17th Feb 2015
Location:
Posted: 18th Jul 2016 13:57
Really? How?

Try to do this page https://en.wikipedia.org/wiki/Emu
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 18th Jul 2016 17:22
Check the example code in the help for GetHTTPResponse()
And don't forget you are requesting a secure page so the SetHTTPHost will need the corresponding flag setting.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt

Login to post a reply

Server time is: 2024-11-23 22:16:53
Your offset time is: 2024-11-23 22:16:53