RemoveHTML - function ?

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
Sign In or Register to comment.

Howdy, Stranger!

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

Categories