do you know what socket programming is...?
make a socket wrapper and use it to connect to ugbase.eu:80
step 1:send http POST packets(to /NChat/index.php) with the proper information to login and get the cookie
step 2:send http POST packets(to /NChat/index.php) with the cookie and with correct data to send chat messages.
step 3:send http POST packet(to /NChat/index.php) (data: nchat=read)
step 4: parse the results into your application(console, windows app, directx app,java.whatever). done.
translate this javascript code to the programming language you're using:
PHP:
function nchat_sender() // javascript code for building packet for chat messages.
{
var d=new Date();
if(nchatInput.value.length > 0)
{
if((d.getTime() - last_chat) >= limit_time*1000){
var formatString = "";
if(format_bold) formatString += "&&bold=true";
if(format_underline) formatString += "&&underline=true";
if(format_italic) formatString += "&&italic=true";
formatString += "&&color=" + document.getElementById("nchat_color").value;
sender = nchat_ajax("nchat=write&&nchat_mess=" + nchat_replace(nchatInput.value) + formatString, true);
clearTimeout(reload);
nchat_reload();
nchatInput.value = "";
last_chat = d.getTime();
}else{
alert("Slow down! You type so fast!!");
}
}else{
alert("Empty message!");
}
}
PHP:
function nchat_parser(nchat) // use these functions for parsing chat messages.
{
var nchat_content = "";
var nchat_regex;
if(typeof nchat[0] !== "undefined" && nchat[0] !== null)
{
for(i=0;i<nchat.length;i++){
nchat_small_mess = nchat[i].split("|!|");
nchat_content += "<span style=\"font-size:70%;\">[" + nchat_small_mess[4] + "]</span>";
if(nchat_small_mess[1] != "-")
{
nchat_content += " <a href=\"http://ugbase.eu/index.php?action=profile;u=" + nchat_small_mess[2] + "\" style=\"color:" + nchat_small_mess[1] + ";\">" + nchat_small_mess[3] + "</a>:";
}else{
nchat_content += " <a href=\"http://ugbase.eu/index.php?action=profile;u=" + nchat_small_mess[2] + "\">" + nchat_small_mess[3] + "</a>:";
}
nchat_small_mess[5] = nchat_small_mess[5]
for(j=0;j<nchat_smiles_list.length;j++)
{
nchat_regex = new RegExp(nchat_smiles_list[j][0], "gi");
nchat_small_mess[5] = nchat_small_mess[5].replace(nchat_regex, "<img src='" + nchat_smiles_list[j][1] + "' />");
}
nchat_content += "<span style=\"color:" + nchat_small_mess[0] + ";\">" + nchat_small_mess[5] + "</span>
";
}
}
nchatOutput.innerHTML = nchat_content;
}
function nchat_replace(str)
{
str = str.replace(/\+/g, "%2B").replace(/\&/g, "%26").replace(/\#/g, "%23");
return str;
}
function nchat_format(what)
{
if(document.getElementById(what).innerHTML.length > 1) {
document.getElementById(what).innerHTML = document.getElementById(what).innerHTML[0];
if(what == "bold"){
nchatInput.style.fontWeight = "normal";
format_bold = false;
}
if(what == "italic"){
nchatInput.style.fontStyle = "normal";
format_italic = false;
}
if(what == "underline"){
nchatInput.style.textDecoration = "none";
format_underline = false;
}
}else{
document.getElementById(what).innerHTML += "*";
if(what == "bold"){
nchatInput.style.fontWeight = "bold";
format_bold = true;
}
if(what == "italic"){
nchatInput.style.fontStyle = "italic";
format_italic = true;
}
if(what == "underline"){
nchatInput.style.textDecoration = "underline";
format_underline = true;
}
}
nchatInput.focus();
}
you can hook this with s0beit, use d3d functions to display text and stuff..