Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

RemoveHTML - function ?

messy23messy23 Member Posts: 1
Hey!
First: Sorry for my bad english, I'm german ;)

I'm coding a chatbot for a http-chatsystem. I want to show the messages of the chatters in the console but i have no idea how to realize that.

e.g. i have:

[code]CString toSend;
toSend.Format("GET /LOGIN?name=%s&pwd=%s&id=%s HTTP/1.0
Host: %s

",Name,Pwd,Id,Server);

CSocket sck;
sck.Create();
printf("Socket created...
");
sck.Connect(Server,IPort);
printf("Connected to Chatserver...
");
sck.Send(toSend,toSend.GetLength());
printf("Login-request has been sent...
");
[/code]

and then a while(true){} loop for keeping the bot alive.
the loop looks like this:

[code]while(true)
{
sck.Receive(toReceive,sizeof(toReceive));
printf("%s
",toReceive);
}[/code]

Now I want to format toReceive (it's defined as char toReceive[2100];) a bit, because it's HTML-code. So the HTML tags should be cutted out by a RemoveHTML() function. I couldn't find a solution yet, so I hope you may find one ;).

Thx Messy

Comments

  • Justin BibJustin Bib USAMember Posts: 0

    ___ || http://forcoder.org || free video tutorials and ebooks about < PHP, Objective-C, Go, C, Delphi, Visual Basic, Ruby, Visual Basic .NET, Perl, JavaScript, PL/SQL, Scratch, C#, Swift, Python, R, Assembly, Java, MATLAB, C++ ML, Dart, Fortran, Clojure, Lisp, Awk, Crystal, Lua, SAS, Bash, FoxPro, Apex, Kotlin, COBOL, Transact-SQL, ABAP, Prolog, Scala, VBScript, Erlang, Hack, Logo, Ada, Julia, Scheme, D, LabVIEW, Rust, Alice, F# /> _________

Sign In or Register to comment.