I know that you can open a webpage up in a browser from DC++, but is there a way to read a webpage into a variable? If it comes in with all the html tags included, that's fine. I have played with creating HttpConnection variable types, but I can't figure out how to get it OUT of there and into a variable so it can be manipulated, parsed, displayed, etc.
-Gratch06
Web Page --> variable. How?
Moderator: Moderators
the short answer would be:
get your own HttpConnection object,
yourHttpConnection->addListener your own HttpConnectionListener subclass object
call yourHttpConnection->downloadFile,
and then wait for data to arrive in YourListenerObject::onAction(HttpConnectionListener::Types type, HttpConnection* /*conn*/, const BYTE* buf, int len)
(see lines 1423-1432 in MainFrm.cpp)
get your own HttpConnection object,
yourHttpConnection->addListener your own HttpConnectionListener subclass object
call yourHttpConnection->downloadFile,
and then wait for data to arrive in YourListenerObject::onAction(HttpConnectionListener::Types type, HttpConnection* /*conn*/, const BYTE* buf, int len)
(see lines 1423-1432 in MainFrm.cpp)
http://dc.selwerd.nl/hublist.xml.bz2
http://www.b.ali.btinternet.co.uk/DCPlusPlus/index.html (TheParanoidOne's DC++ Guide)
http://www.dslreports.com/faq/dc (BSOD2600's Direct Connect FAQ)
http://www.b.ali.btinternet.co.uk/DCPlusPlus/index.html (TheParanoidOne's DC++ Guide)
http://www.dslreports.com/faq/dc (BSOD2600's Direct Connect FAQ)
-
- DC++ Contributor
- Posts: 3212
- Joined: 2003-01-07 21:46
- Location: .pa.us
Code: Select all
C:\...src\windows\HubFrame.cpp(335): error C2664: 'Speaker<class HttpConnectionListener>::addListener' : cannot convert parameter 1 from 'HubFrame *const ' to 'HttpConnectionListener *'
HttpConnectionListener subclass object
I don't know what you edited, but you might want to add "private HttpConnectionListener" to the list of HubFrame's superclasses
http://dc.selwerd.nl/hublist.xml.bz2
http://www.b.ali.btinternet.co.uk/DCPlusPlus/index.html (TheParanoidOne's DC++ Guide)
http://www.dslreports.com/faq/dc (BSOD2600's Direct Connect FAQ)
http://www.b.ali.btinternet.co.uk/DCPlusPlus/index.html (TheParanoidOne's DC++ Guide)
http://www.dslreports.com/faq/dc (BSOD2600's Direct Connect FAQ)