POST request + Netscape
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Lee_J
Posted On:   Saturday, September 15, 2001 09:16 AM

Hello, I am trying to set up a POST request to q site on the www. I have all the details needed in sending the request through using a program which catches the sites request headers etc. I have set up the request using URLconnection which works fine for at home. At University they use an old version of Netscape and this seems to cause problems!! Can anyone please tell me how to convert the code to use Sockets instead, as I think this may help ?? req += "http://www.price-guide.co.uk/search_main2.asp "; req += "HTTP/1.0 "; req += "Referer: http://www.price-guide.co.uk/search_main2.asp?type=CPU&Class=8 "; req += "Proxy-Con   More>>

Hello,

I am trying to set up a POST request to q site on the www. I have all the details needed in sending the request through using a program which catches the sites request headers etc. I have set up the request using URLconnection which works fine for at home. At University they use an old version of Netscape and this seems to cause problems!!

Can anyone please tell me how to convert the code to use Sockets instead, as I think this may help ??


			
req += "http://www.price-guide.co.uk/search_main2.asp
";
req += "HTTP/1.0
";
req += "Referer: http://www.price-guide.co.uk/search_main2.asp?type=CPU&Class=8
";
req += "Proxy-Connection: Keep-Alive
";
req += "User-Agent: Mozilla/4.75 [en] (X11; U; SunOS 5.7 sun4u)
";
req += "Host: www.price-guide.co.uk
";
req += "Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/png, */*
";
req += "Accept-Encoding: gzip
";
req += "Accept-Language: en
";
req += "Accept-Charset: iso-8859-1,*,utf-8
";
req += "Cookie: SITESERVER=ID=b6ea3511d1bae447f8ba0dae5eb3738d; ASPSESSIONIDQGQGGGZU=OKAKFELCNCDIJOPCIFKNFAOD
";
req += "Content-type: application/x-www-form-urlencoded
";
req += "Content-length: 56

";
req += "max=&inc=";
req += info;
req += "&klasse=" + classnum;
req += "&Search=Display+records";


URL url = new URL(parsePage);

HttpURLConnection uc = (HttpURLConnection)url.openConnection();
tok = new HtmlStreamTokenizer(new InputStreamReader(uc.getInputStream()));


Thanks for any help.

Lee

   <<Less

Re: POST request + Netscape

Posted By:   Sandeep_Deshmukh  
Posted On:   Thursday, November 1, 2001 03:03 AM

Hi lee,I am facing same kind
of problems. I have tried

using sockets. But they don't

work with all the sites.
Escpecially when you have to

set some properties like cookies.

But,does the code provoided by you
above works with all the sites
without any problems?

Please tell me how you get the
values you have setted(such as
cookies), each time? or you have
hard coded them.

Please also tell,me if you have
accessed https sites successfully.
I have not still started on https.

If possible, please reply me back
on my eamil,

deshmukhsandeep@rediffmail.com

thanx.

sandeep
About | Sitemap | Contact