PHP Classes

POST method not working

Recommend this page to a friend!

      PHP HTTP protocol client  >  All threads  >  POST method not working  >  (Un) Subscribe thread alerts  
Subject:POST method not working
Summary:The class is not working with a post form
Messages:2
Author:Mario Bittencourt
Date:2005-02-23 03:53:06
Update:2005-02-23 05:00:17
 

  1. POST method not working   Reply   Report abuse  
Picture of Mario Bittencourt Mario Bittencourt - 2005-02-23 03:53:06
Hi,

I need to access the results of a query of the page http://200.241.125.78:443/cposg/index.jsp

Even tough it uses the 443 port is a regular web server.

My script sets the arguments

$arguments["RequestMethod"]="POST";
$arguments["PostValues"]=array(
"cbPesquisa"=>"NUMPROC",
"dePesquisa"=>"2003.000675-3",
"chNmCompleto"=>"NAO",
"chProcAtivos"=>"NAO"
);

But the anwser is always a redirect page.

I've accessed the address using several browsers and the go ok, but no luck with the access from the script.

Any ideas of other things to test ?

  2. Re: POST method not working   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2005-02-23 05:00:17 - In reply to message 1 from Mario Bittencourt
Currently the classe does not handle automatically response code 100 despite it supports other HTTP 1.1 features. Therefore, just set the protocol version to 1.0.

$http->protocol_version="1.0";

It seems that JSP pages also do not support multipart/form-data . Therefore disable this kind of POST requests this way.

$http->force_multipart_form_post=0;

With these changes, I was able to access the results page like normal browsers.