Featured post

c# - Usage of Server Side Controls in MVC Frame work -

i using asp.net 4.0 , mvc 2.0 web application. project requiremrnt have use server side control in application not possibl in noraml case. ideally want use adrotator control , datalist control. i saw few samples , references in codepleax mvc controllib howwver found less useful. can tell how utilize theese controls in asp.net application along mvc. note: please provide functionalities related adrotator , datalist controls not equivalent functionalities thanks in advace. mvc pages not use normal .net solution makes use of normal .net components impossible. a normal .net page use event driven solution call different methods service side mvc use actions , view completly different way handle things. also, mvc not use viewstate normal .net controlls require. found article discussing mixing of normal .net , mvc.

How can I fetch data from a website inside a C++ program -


i want write program in c++ helps manage hockey pool, , 1 of key things need read off schedule week ahead. hoping use nhl website. there way have program download html file given url, , parse that? suppose once have file downloaded, simple file i/o do, im not sure how download file.

i use library providing http abstraction.

for example:

cpp-netlib

#include <boost/network/protocol/http/client.hpp> #include <string> #include <iostream> int main() {     boost::network::http::client client;     boost::network::http::client::request request("http://www.example.com");     request << boost::network::header("connection", "close");     boost::network::http::client::response response = client.get(request);      std::cout << body(response); } 

i not think can easier that

on gnu/linux compile with:

g++ -i. -i$boost_root -l$boost_root/stage/lib -lboost_system -pthread my_main.cpp 

qhttp

example quite long, since qhttp can send non-blocking requests (that means, have catch signals reporting request finished, etc.). documentation superb, should not problem. :)


Comments

Popular posts from this blog

c# - Usage of Server Side Controls in MVC Frame work -

cocoa - Nesting arrays into NSDictionary object (Objective-C) -

ios - Very simple iPhone App crashes on UILabel settext -