Hi, We are writing a search engine, which takes information from other search engines. For this we need to send information to server side scripts of other web sites. We accomplished this using GET method, but how to do it, when the server side script on the other site is expecting data from POST method. Finally, is it legal to take information from other sites like this. Please consider the matter very very urgent Thanks
Yes you can, get the servlet to open a Socket to the server as if you were making a request, send the request and read the response. The difficulty is getting the HTTP Header right. It's just a matter of writing some text and I have an example of a POSTed header around I'll just go look for it... OK, here's an example of the HTTP header of a page I sumbitted to myself:
Most of the fields can be ignored, it's mostly the first line and the 'hideme=124&hideme2=124' that's important bit. Also remeber that you need to send an extra CR at the end of your request (basically send an extra empty line) to tell the server that the request is finished otherwise it'll just sit there waiting... Dave.