Current stock price by using sockets in java
- by user2976396
My program is to find the current stock price of a symbol ..this is the code which i m using `String yahoo = "finance.yahoo.com" ;
final int httpd = 80;
Socket sock = new Socket(yahoo,httpd);
PrintWriter out = new PrintWriter( sock.getOutputStream(), true );
BufferedReader in =new BufferedReader(new InputStreamReader( sock.getInputStream() ) );
out.println( "GET http://finance.yahoo.com/q?s=ibm&f=1l HTTP/1.0\r\n\r\n " );
out.println("");
out.flush();`
I am just getting the output as ibm .Can anyone please suggest how to get the price.