Announcement

Collapse
No announcement yet.

How do I make an automatic post?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How do I make an automatic post?

    Hello,

    I have a script that makes a bunch of database inserts and then forwards to a new page using the following statement:

    PHP Code:
    Header("Location: $domain/receipt.php?BI$BID&ON=$ONu
    &PM=
    $PayMethod&CT=$CCType&Co=$Contact
    &UID=
    $UserID"); 
    I need to change the location to post to verisign and send along this information:

    PHP Code:
    <FORM action=https://payflowlink.verisign.com/payflowlink.cfm method=post>
    <INPUT type=hidden value=12345 name=LOGIN> <INPUT type=hidden 
    value
    =VeriSign name=PARTNER
    Verisign won't accept the info if it's attached to the url so I need to send it using the post method. How do I do this?

    Thanks,

    Tim
    Last edited by Tim Mousel; Mon 19 Aug '02, 2:16pm.
    Five Star Review Script - Add reviews to your website!
    Mixed Martial Arts - Houston MMA Training
    Women's Self-Defense - Courses and DVDs available

  • #2
    use a form 0_o, did i miss the point here?

    Comment


    • #3
      /me uses packet sniffer to see how a POST command works....

      It can't be done with PHP, there's a lot of HTTP-generated packet numbers and what ever, here's the command that takes place when I submitted this post (before I editted it):

      Code:
      POST /forum/newreply.php HTTP/1.1.
      Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*.
      Referer: [url]http://www.vbulletin.com/forum/newreply.php?s=&action=newreply&threadid=53054.[/url]
      Accept-Language: en-us.
      Content-Type: multipart/form-data; boundary=---------------------------7d213f10b015a.
      Accept-Encoding: gzip, deflate.
      User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1).
      Host: [url]www.vbulletin.com.[/url]
      Content-Length: 1576.
      Connection: Keep-Alive.
      Cache-Control: no-cache.
      Cookie: [edit ;)].
      
      -----------------------------7d213f10b015a.
      Content-Disposition: form-data; name="s".
      .
      .
      -----------------------------7d213f10b015a.
      Content-Disposition: form-data; name="action".
      .
      postreply.
      -----------------------------7d213f10b015a.
      Content-Disposition: form-data; name="threadid".
      .
      53054.
      -----------------------------7d213f10b015a.
      Content-Disposition: form-data; name="title".
      .
      .
      -----------------------------7d213f10b015a.
      Content-Disposition: form-data; name="iconid".
      .
      0.
      -----------------------------7d213f10b015a.
      Content-Disposition: form-data; name="mode".
      .
      0.
      -----------------------------7d213f10b015a.
      Content-Disposition: form-data; name="status".
      .
      Use these controls to insert vBcode.
      -----------------------------7d213f10b015a.
      Content-Disposition: form-data; name="message".
      .
      /me uses packet sniffer to see how a POST command works.....
      -----------------------------7d213f10b015a.
      Content-Disposition: form-data; name="parseurl".
      .
      yes.
      -----------------------------7d213f10b015a.
      Content-Disposition: form-data; name="signature".
      .
      yes.
      -----------------------------7d213f10b015a.
      Content-Disposition: form-data; name="MAX_FILE_SIZE".
      .
      2097152.
      -----------------------------7d213f10b015a.
      Content-Disposition: form-data; name="attachment"; filename="".
      Content-Type: application/octet-stream.
      .
      .
      -----------------------------7d213f10b015a.
      Content-Disposition: form-data; name="rating".
      .
      0.
      -----------------------------7d213f10.
      Content-Disposition: form-data; name="submit".
      .
      Submit Reply.
      -----------------------------7d213f10b015a--.
      
      HTTP/1.1 200 OK.
      Date: Tue, 20 Aug 2002 03:20:37 GMT.
      Server: Apache/1.3.26 (Unix) PHP/4.2.2.
      X-Powered-By: PHP/4.2.2.
      X-Accelerated-By: PHPA/1.3.1pre3.
      Content-Encoding: gzip.
      Content-Length: 1048.
      Keep-Alive: timeout=10, max=200.
      Connection: Keep-Alive.
      Content-Type: text/html.
      Last edited by Dan615; Wed 21 Aug '02, 4:51pm.

      Comment


      • #4
        Dan,

        I'm not sure if exposing your cookie is such a good idea.

        Comment


        • #5
          Here's why I'm not using a form:

          User fills out name, address, etc... and clicks submit. The submit sends them to order.php. order.php makes a bunch of mysql inserts and then forwards the user to the receipt page.

          So, after the user fills out the form, I need to do the mysql inserts and then send their information to https://payflowlink.verisign.com/payflowlink.cfm

          I could make another form page but then the user would have to click two submit buttons instead of one.

          Any ideas?
          Five Star Review Script - Add reviews to your website!
          Mixed Martial Arts - Houston MMA Training
          Women's Self-Defense - Courses and DVDs available

          Comment


          • #6
            oh boy so many codes, so little time..ive got to seriously catch up on my reading....

            Ido

            Comment


            • #7
              Originally posted by agentd
              Dan,

              I'm not sure if exposing your cookie is such a good idea.
              That's why they're encrypted, unless someone wants to try and get into my profile by connecting to vBulletin.com's DB...

              Comment


              • #8
                Originally posted by Tim Mousel
                Here's why I'm not using a form:

                User fills out name, address, etc... and clicks submit. The submit sends them to order.php. order.php makes a bunch of mysql inserts and then forwards the user to the receipt page.

                So, after the user fills out the form, I need to do the mysql inserts and then send their information to https://payflowlink.verisign.com/payflowlink.cfm

                I could make another form page but then the user would have to click two submit buttons instead of one.

                Any ideas?
                PHP Code:
                <html>
                <head>
                <title> Redirecting... </title>
                </head>
                <body onLoad="document.form1.submit();">
                Your information is being verified.  Please wait...
                <form name="form1" action="https://payflowlink.verisign.com/payflowlink.cfm" method="post">
                <input type="hidden" name="CCType" value="<?=$CCtype?>">
                <!-- and so on for all the other stuff.... -->
                <input type="hidden" name="LOGIN" value="12345">
                <input type="hidden" name="PARTNER" value="VeriSign">
                </form>
                </body>
                </html>
                Now, I've had trouble with that method before, so here's an alternative if you start getting JavaScript errors...

                PHP Code:
                <html>
                <head>
                <title> Redirecting... </title>
                </head>
                <body>
                Your information is being verified.  Please wait...
                <form name="form1"  action="https://payflowlink.verisign.com/payflowlink.cfm" method="post">
                <input type="hidden" name="CCType" value="<?=$CCtype?>">
                <!-- and so on for all the other stuff.... -->
                <input type="hidden" name="LOGIN" value="12345">
                <input type="hidden" name="PARTNER" value="VeriSign">
                </form>
                <script language="JavaScript">
                document.form1.submit();
                </script>
                </body>
                </html>
                Hope that helps

                Comment


                • #9
                  Originally posted by Dan615


                  That's why they're encrypted, unless someone wants to try and get into my profile by connecting to vBulletin.com's DB...
                  Actually, you could login using the encrypted password hash... http://www.board.com/index.php?bbuserid=X&bbpassword=hash

                  Comment


                  • #10
                    Originally posted by MUG
                    Actually, you could login using the encrypted password hash... http://www.board.com/index.php?bbuse...bpassword=hash
                    Not if the vBulletin Development Team uses $HTTP_COOKIE_VARS and $HTTP_POST_VARS to make sure they don't come through the QS

                    Edit: or $_POST and $_COOKIE, but I assuming they're aiming for backward compatibility...

                    Comment


                    • #11
                      Dan,

                      I used your second example and it worked great. Thank you so very much!!!!!!!

                      Tim
                      Five Star Review Script - Add reviews to your website!
                      Mixed Martial Arts - Houston MMA Training
                      Women's Self-Defense - Courses and DVDs available

                      Comment


                      • #12
                        I live to serve

                        Comment

                        widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                        Working...
                        X