sending form post data

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

How can I have a php script send data to a URL as form post data from
within the script without creating an actual form in a web page.

I am working with an affiliate program (from Affiliateshop) and the
instructions are 'have your script send a form post with the name of the
form fields "AID" and "BID" and their values to the following URL string...'



Re: sending form post data

and you might want to see if a GET works..
instructions could have been written by a bonehead

Re: sending form post data

Quoted text here. Click to load it

You are the first person to ask that question here... But not really:


Re: sending form post data

You need PEAR class ( )

require_once "Request/Request.php";
$req =& new HTTP_Request("/");
$req->addHeader("Content-Type", "application/x-www-form-urlencoded");
$req->addPostData("", "");
if (!PEAR::isError($req->sendRequest())) {
          $response1 = $req->getResponseBody();
     } else {
          $response1 = "";

Site Timeline