• Log in or sign up for an account here: https://www.sythe.org/login

More Help needed by Esuom...

Esuom

Guru
Banned
Joined
May 3, 2007
Sythe Gold
0
Messages
1,731
Location
EST Time Zone.
More Help needed by Esuom...
Okay, I had a friend write me up a few functions that I needed, the problem is, I haven't seen him in a while and the function I need, I don't understand 100% on how to use.

I am trying to use...

Code:
string GetSource(char m_strURL[])
{
	if ( m_strURL == "" )
	{
		return "";
    }

	HINTERNET hINet, hFile;
	hINet = InternetOpen("InetURL/1.0", INTERNET_OPEN_TYPE_PRECONFIG, NULL, NULL, 0 );

	if ( !hINet )
	{
		return "";
	}

	hFile = InternetOpenUrl( hINet, m_strURL, NULL, 0, 0, 0 ) ;
    string m_strContents;

	if ( hFile )
	{
		CHAR buffer[1024];
		DWORD dwRead;
		while ( InternetReadFile( hFile, buffer, 1023, &dwRead ) )\
		{
			if ( dwRead == 0 )
				break;
			buffer[dwRead] = 0;
			m_strContents += buffer;
		}
		InternetCloseHandle( hFile );
	}
	InternetCloseHandle( hINet );  
    return m_strContents;    
}


I know what it is supposed to do, I just can't figure out the set up.


Thanks for any help.
 
Runescape Gamblingrunescape gambling
Back
Top