Tuesday, February 14, 2012

Send post request without form with redirct in PHP [closed]


I try to connect Amex payment gateway. Here I want to submit post request to amex server and redirect to that page. I make request data from database and user inputs. Now i have request data. I use zend framework. How i send it as post request to amex server with redirect that page? Please help me.


2 comments:

  1. You can use cURL for that.

    A good tutorial that covers your needs can be found here.

    ReplyDelete
  2. For Zend Framework you want to be looking at http client adapters:

    http://framework.zend.com/manual/en/zend.http.client.adapters.html

    Look at the cURL adaptor, you should be able to use that to send data over post.

    Redirecting in a Zend Controller:

    $this->_helper->redirector->gotoRoute(array(
    'module' => 'modulename',
    'controller' => 'controllername',
    'action' => 'actionname',
    ));

    ReplyDelete