Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Web data extraction using Visual C++

Status
Not open for further replies.

thegame8311

Technical User
Jan 6, 2012
133
US
I was wondering if the is a way to extract web data using visual C++. If I tried to do it though the Windows console attached to my project would that work or is there a better method
 
I have seen many ways, but strictly I am using visual c++ not visual studio, I have seen URLDownloadToFile, wget and curl but I can't get any of them to work, here is my code:

Code:
#include "stdafx.h"
#include <urlmon.h>
#include <iostream>
#include <tchar.h>

using namespace std;

int _tmain(int argc, _TCHAR* argv[])
{
	HRESULT hr = URLDownloadToFile(NULL, _T("[URL unfurl="true"]http://www.nfl.com"),[/URL] _T("test2.html"), 0, NULL);
	cout << "hi" << endl;
	system("PAUSE");
	return 0;
}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top