Results 1 to 2 of 2
Thread: Problem with Sockets
- 03-22-2011, 06:56 PM #1
Member
- Join Date
- Mar 2011
- Posts
- 2
- Rep Power
- 0
Problem with Sockets
Hello every one... i writing a simple program that would do a "GET" one a web site (in my case it is torrentz.eu). I get several problems:
1. the html dump with my code is not the same as what i see on the browser
2. how can i access or use the search text box, i mean how can i with a java code do some thing like search a movie name and retrieve results (by retrieve i mean see the result html page as per search)
here is my code
I tried doing a get with the link that appears on the address bar of the browser after a do a search with the site (say torrentz.eu). I would really appreciate any help, thanks in advance...Java Code:package getmethod; // HTTP GET through socket, not through "URL" class import HTTPstuff.*; import java.net.*; import java.io.*; public class Main { public static void main ( String[] args ) { getPage gt = new getPage(); try { gt.getPageSourceCode(); } catch (UnknownHostException e) {} catch (IOException e) {} } }
- 04-06-2011, 02:21 PM #2
Member
- Join Date
- Mar 2011
- Posts
- 2
- Rep Power
- 0
Thank you for the reply
wow thats a lot of useful in the future information.... really no sarcasm i appreciate your effort in explaining various details of sockets and their use... i figured out the problem i had with my code , well i simply ditched the socket class and used the URL class which in turn was a lot easier to use. Not to say i didnt try fix what was wrong with the previous class, i did and the problem was with the header i sent along with the GET. Once again thank you for your help :).
Similar Threads
-
Problem with Sockets
By pinheiroa in forum NetworkingReplies: 15Last Post: 09-05-2010, 10:53 PM -
Problem with sockets reading in defined thread.
By Dodo in forum New To JavaReplies: 6Last Post: 11-18-2009, 11:39 PM -
TCP sockets problem
By duffman.sk in forum NetworkingReplies: 1Last Post: 10-30-2009, 05:06 AM -
Problem (sockets)
By Blacknight962 in forum New To JavaReplies: 3Last Post: 08-16-2009, 12:56 AM -
Sockets and JFrames problem
By marcg11 in forum Advanced JavaReplies: 6Last Post: 08-15-2009, 01:07 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks