• Post Reply Bookmark Topic Watch Topic
  • New Topic

Yahoo chat client, any ideas.......

 
allen turner
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hai,
I want to make a yahoo chat client. i have the packet structure and the details for the chat. But i have to get a cookie from the chat server via http but some how i am not able to get that. this is the code i used to connect to the http chat server

import java.net.*;
public class MyHttp
{
HttpURLConnection conn ;
public MyHttp()
{

try
{


//String url = "http://www.yahoo.com/";
String url="http://cs31.msg.sc5.yahoo.com/config/ncclogin?&n=1&login=username&passwd=pwsword
URL hp = new URL(url);
URLConnection hpCon = hp.openConnection();
HttpURLConnection uc = (HttpURLConnection)hpCon;
uc.connect();
int responseCode = uc.getResponseCode();
System.out.println("Response code: " + responseCode);
String responseMsg = uc.getResponseMessage();
System.out.println("Response Msg: "+responseMsg);

}
catch(Exception e)
{
System.out.println(e);
}
}

public static void main(String args[])
{
MyHttp conn = new MyHttp();

}

}

if i give yahoo url or any other usual url the code seems to work. but the chat login url does not seem to work. any ideas.........
thanks
Byee
 
Jacob Vasconcellos
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok, check this out...the reason why the login URL doesn't want to work for you is because good old Yahoo has changed the Messenger login protocols for version 5.0 and up, now there's a challenge response type system that involves encryptions and other such crazy things. The best I can do for you is point you to a site that explains the login process...as for the actual algorithm...there's one DLL that handles it in assembly and I have some source that handles it in C++ I've yet to find anyone who handles it in Java.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!