Click here to Skip to main content
15,887,214 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Saving, Opening and possible conflicts Pin
PJ Arends24-Apr-05 11:49
professionalPJ Arends24-Apr-05 11:49 
GeneralRe: Saving, Opening and possible conflicts Pin
Member 66746824-Apr-05 19:01
Member 66746824-Apr-05 19:01 
GeneralRe: Saving, Opening and possible conflicts Pin
PJ Arends25-Apr-05 6:58
professionalPJ Arends25-Apr-05 6:58 
QuestionShould I restrict my program's disk activity? Pin
IGx8924-Apr-05 11:01
IGx8924-Apr-05 11:01 
AnswerRe: Should I restrict my program's disk activity? Pin
PJ Arends24-Apr-05 11:12
professionalPJ Arends24-Apr-05 11:12 
GeneralRe: Should I restrict my program's disk activity? Pin
IGx8924-Apr-05 15:57
IGx8924-Apr-05 15:57 
AnswerRe: Should I restrict my program's disk activity? Pin
Michael Dunn24-Apr-05 21:16
sitebuilderMichael Dunn24-Apr-05 21:16 
GeneralProblem with reading an URL Pin
acroitoriu24-Apr-05 9:56
acroitoriu24-Apr-05 9:56 
My problem is that I have to read the content of a web page which is dynamic (written in PHP), and the content is always different. I read the content using the following code :
<br />
void CHS_VCDlg::Onread() <br />
{<br />
	// TODO: Add your control notification handler code here<br />
	CString URL = "http://www.eed.usv.ro/~pentiuc/hs2005/index.php";<br />
	CInternetSession session;<br />
	m_Result += "Trying " + URL + "\r\n";<br />
	UpdateData(FALSE);<br />
	CInternetFile* file = NULL;<br />
	try<br />
		{<br />
		//We know for sure this is an Internet file,<br />
		//so the cast is safe<br />
		file = (CInternetFile*) session.OpenURL(URL);<br />
		}<br />
	catch (CInternetException* pEx)<br />
		{<br />
		//if anything went wrong, just set file to NULL<br />
		file = NULL;<br />
		pEx->Delete();<br />
		}<br />
	if (file)<br />
		{<br />
		m_Result += "Connection established. \r\n";<br />
		CString line;<br />
		for (int i=0; i < 20 && file->ReadString(line); i++)<br />
			{<br />
			m_Result += line + "\r\n";<br />
			}<br />
		file->Close();<br />
		delete file;<br />
		}<br />
	else<br />
		{<br />
		m_Result += "No server found there. \r\n";<br />
		}<br />
		m_Result += "------------------------\r\n";<br />
		UpdateData(FALSE);<br />
}<br />


It works well, but the problem is that I have to clear the cache and the cookies all the time from Internet Explorer.
I want to know if there a way to clear the cache and the cookies by code in order to read the new content of the page every time I call this function?? Confused | :confused:

Croitoriu Andrei
croi2001@yahoo.com
GeneralRe: Problem with reading an URL Pin
Michael Dunn24-Apr-05 21:19
sitebuilderMichael Dunn24-Apr-05 21:19 
GeneralRe: Problem with reading an URL Pin
acroitoriu25-Apr-05 2:45
acroitoriu25-Apr-05 2:45 
GeneralRe: Problem with reading an URL Pin
Michael Dunn25-Apr-05 6:17
sitebuilderMichael Dunn25-Apr-05 6:17 
GeneralCString question - urgent Pin
hithesh24-Apr-05 9:00
hithesh24-Apr-05 9:00 
GeneralRe: CString question - urgent Pin
PJ Arends24-Apr-05 9:04
professionalPJ Arends24-Apr-05 9:04 
GeneralRe: CString question - urgent Pin
hithesh24-Apr-05 9:39
hithesh24-Apr-05 9:39 
GeneralRe: CString question - urgent Pin
Maximilien24-Apr-05 11:19
Maximilien24-Apr-05 11:19 
GeneralRe: CString question - urgent Pin
hithesh24-Apr-05 15:44
hithesh24-Apr-05 15:44 
GeneralRe: CString question - urgent Pin
ThatsAlok24-Apr-05 18:59
ThatsAlok24-Apr-05 18:59 
GeneralRe: CString question - urgent Pin
toxcct24-Apr-05 20:44
toxcct24-Apr-05 20:44 
GeneralText Object Model Pin
Jim Crafton24-Apr-05 8:57
Jim Crafton24-Apr-05 8:57 
GeneralStructions in Windows Pin
Grahamfff24-Apr-05 8:52
Grahamfff24-Apr-05 8:52 
GeneralRe: Structions in Windows Pin
PJ Arends24-Apr-05 9:18
professionalPJ Arends24-Apr-05 9:18 
GeneralCompression Pin
_Jackie24-Apr-05 8:16
_Jackie24-Apr-05 8:16 
GeneralRe: Compression Pin
John M. Drescher24-Apr-05 9:20
John M. Drescher24-Apr-05 9:20 
GeneralRe: Compression Pin
PJ Arends24-Apr-05 9:21
professionalPJ Arends24-Apr-05 9:21 
Generalvc++ progamming for multimedia Pin
ahmadmz24-Apr-05 7:35
ahmadmz24-Apr-05 7:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.