Hi,
My question is simple, it just to make a simple chat program, via web instead of using server/clients. However, it could be using the following URL:
http://www.sbox.ws/sbox_ws.php?
name=
Name&website=&shoutid=1b867wq7jorwwf4u0qwk
I mean by this above, this site has button, named submit and the small text for entering the message then for submit the text as chat program exactly :
In c++, I got the following codes:
#include "afxinet.h"
BOOL DoSubmitURLText(const char *url, CString &errorMessage) {
TCHAR szCause[255]; errorMessage = "OK";
TRY {
CInternetSession session;
session.SetOption(INTERNET_OPTION_CONNECT_TIMEOUT, 1000); session.SetOption(INTERNET_OPTION_CONNECT_RETRIES, 3);
session.OpenURL(url, 1 ,INTERNET_FLAG_TRANSFER_ASCII |INTERNET_FLAG_FORMS_SUBMIT); }
CATCH_ALL(error)
{
error->GetErrorMessage(szCause,254,NULL);
errorMessage.Format("%s",szCause);
return FALSE;
} END_CATCH_ALL;
return TRUE;
}
In OpenURL, has the function for open this URL, without open it in the browser.
I mean, by I would like to make this action, by sending also the message via that website(shoutbox above ) also to submit it.
Is there any codes in c++ for control this ? adding or modified something ?
Thank in advance!