Click here to Skip to main content
15,893,663 members

How to change the following codes to control something as chat program

skonliner asked:

Open original thread
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:
C++
#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!
Tags: C++ (C++/CLI), Javascript, HTML, COM, COM+

Plain Text
ASM
ASP
ASP.NET
BASIC
BAT
C#
C++
COBOL
CoffeeScript
CSS
Dart
dbase
F#
FORTRAN
HTML
Java
Javascript
Kotlin
Lua
MIDL
MSIL
ObjectiveC
Pascal
PERL
PHP
PowerShell
Python
Razor
Ruby
Scala
Shell
SLN
SQL
Swift
T4
Terminal
TypeScript
VB
VBScript
XML
YAML

Preview



When answering a question please:
  1. Read the question carefully.
  2. Understand that English isn't everyone's first language so be lenient of bad spelling and grammar.
  3. If a question is poorly phrased then either ask for clarification, ignore it, or edit the question and fix the problem. Insults are not welcome.
  4. Don't tell someone to read the manual. Chances are they have and don't get it. Provide an answer or move on to the next question.
Let's work to help developers, not make them feel stupid.
Please note that all posts will be submitted under the http://www.codeproject.com/info/cpol10.aspx.



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900