gingerfish 0 Light Poster

hi :)

i'm just wondering if there is any way to access to another website using my own?

i have some input data and when i put it into the form of my website, it will search it in the another website's database and show me the result.

i know the way to do it only if the URL of that website changes once i give the input

<%@ page import="*" %>
<%@ page import="*" %>


if (request.getParameter("word") != null && request.getParameter("to") != null) {
		String TARGET_SITE = "|";
		String result="";
		String targetWord=request.getParameter("word");
		String targetLang=request.getParameter("to");
		String between1 = "&q=";
		String between2 = "&hl=";
		String atend = "&aq=f";
		String data;
		URL u;
		URLConnection uc;
		u = new URL(TARGET_SITE+targetLang+between1+targetWord+between2+targetLang+atend);
		uc = u.openConnection(); 

		InputStream is = uc.getInputStream(); 
		BufferedReader reader = new BufferedReader(new InputStreamReader(is));
		while((data = reader.readLine()) != null){
			result += data;

		String zeroSearch = "<strong>0</strong> result for";//+targetWord+" in UniProtKB";

		if(result.indexOf(zeroSearch) > -1){			//if search not found
			out.print(zeroSearch+" "+targetWord);
			String searchHTMLstring = "padding:0 .25em 0 .25em; width:auto; overflow:visible";
			int startFrom = result.indexOf(searchHTMLstring);

			String getHTML = result.substring(startFrom, result.length());

}//end if
		out.print("");	//not to appear with result

<form method=get target=_blank>
English Word:
<input type=text name=word><input type=submit value=Search><br>
To: <input type=radio name=to value=ko> Korean
<input type=radio name=to value=ru> Russian 


but what if the URL still remains same even after i give the input? :?:
please someone help me :'(

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.