PHP post two different places

Discussion in 'PHP' started by e96, Feb 26, 2008.

  1. #1
    Hi all,
    need a little help -- if I have a use submit a form, is it possible to ALSO send a http POST to another web page. The catch, for me at least, is how do i send this second POST without actually taking the user to the second page.

    Example

    <form method=post action='page1.php'></form>
    Code (markup):
    When page1.php receives the post (and does it's own processing) I also want it to send a POST to another page.


    basically, I am trying to integrate two different backend systems. my life will be great if there is a way to have PHP do this.
     
    e96, Feb 26, 2008 IP
  2. selling vcc

    selling vcc Peon

    Messages:
    361
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    0
    #2
    CURL will allow you to do it easily...
     
    selling vcc, Feb 26, 2008 IP
    e96 likes this.
  3. maiahost

    maiahost Guest

    Messages:
    664
    Likes Received:
    35
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Try fopen if it's allowed (don't post the data, rather get) or curl. It should do the trick.
     
    maiahost, Feb 26, 2008 IP
  4. e96

    e96 Active Member

    Messages:
    299
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    80
    #4
    thanks for pointing me in the right direction.
     
    e96, Feb 26, 2008 IP
  5. Neorics

    Neorics Peon

    Messages:
    173
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #5
    not sure about the exact codes but i think you can define a variable to be an array and put the variable for the action, not sure if it would work though
     
    Neorics, Feb 26, 2008 IP