Back to the WFC main page
wfc_get_web_page
$Revision: 18 $
Declaration
void wfc_get_web_page( CUniformResourceLocator& url, CStringArray& page_contents )
Description
This function takes a url and retrieves it from Internet. What you get is an
array of CStrings containing the source for that page. This function is meant
to provide the capability to pull data from Internet and chew on it inside
a program (as opposed to display it to a user).
Example
void print_maryland_weather_report( void )
{
WFCTRACEINIT( TEXT( "print_maryland_weather_report()" ) );
CUniformResourceLocator url( TEXT( "http://iwin.nws.noaa.gov/iwin/md/hourly.html" ) );
CStringArray weather_report;
wfc_get_web_page( url, weather_report );
int index = 0;
int number_of_lines_in_report = weather_report.GetSize();
while( index < number_of_lines_in_report )
{
_tprintf( TEXT( "%s\n" ), (LPCTSTR) weather_report.GetAt( index ) );
index++;
}
}
Copyright, 2000, Samuel R. Blackburn
$Workfile: wfc_get_web_page.cpp $
$Modtime: 1/17/00 9:34a $