Skip to main content

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.




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

Post a Comment

Popular posts from this blog

Wildcards in a hosts file

I want to setup my local development machine so that any requests for *.local are redirected to localhost . The idea is that as I develop multiple sites, I can just add vhosts to Apache called site1.local , site2.local etc, and have them all resolve to localhost , while Apache serves a different site accordingly.