Welcome to the JaguarPC Community
JaguarPC
Sales: (888) 338-5261
Support: (888)-551-3050
Results 1 to 5 of 5

This is a discussion on sockets 4 remote url in the Shared & Semi-Dedicated forum
Hi all. I know how post variables to one remote page using cURL and sockets, but what I need is to post variables to one ...

  1. #1
    JPC Senior Member
    Join Date
    Mar 2003
    Posts
    74

    sockets 4 remote url

    Hi all.

    I know how post variables to one remote page using cURL and sockets, but what I need is to post variables to one page, then press the submit button automatically, which takes me to the next page. I then need to post variables to this page.

    What sort of code would I need to do this? Thanks

  2. #2
    the Windlord Gwaihir's Avatar
    Join Date
    Jun 2002
    Posts
    2,562
    You mean you want a form to submit when the user completes the last entry? I use a JavaScript for that: OnChange='submit()'
    Regards,

    Wim Heemskerk
    ---
    Visit MeCCG.net - Cardgaming in J.R.R. Tolkien's Middle-earth
    And Gwaihir.net - The Middle-earth CCG store

  3. #3
    Community Leader jason's Avatar
    Join Date
    Sep 2001
    Location
    Rochester, NY
    Posts
    6,003
    The submit button is nothing more than another field in the form. It has its own name and value. When you send the request through cURL you aren't actually pressing submit, but the behind--the-scenes processing is identical. Once the processing is done the server sends back a new HTML p age wich contains a new form. As far as the server is concerned, its done. It doesn't remember or care about what you just did. You can submit the next form exactly the same way you did for the first.

    Although the server doesn't remember you when you submit the second form, the application you are submitting to may. Usually multi-form sites employ some form of tracking variable, either as a cookie or as a hidden variable in the second form, so you'll want to check the output from this. If it usees a hidden variable, you'll need to extract it from cURL's result using regular expressions since it will be different every time you make the call. Its also possible (although this practice is getting less and less common these days) that the data you sent in the first form will be repeted as hidden fields in the second. If this is the case, you can probably eliminate the the first call to curl and send everything in the second.

    I hope this helps clear the process up for you. What you are trying to do is rather complex. Its the type of thing that makes even the most experienced programmers cringe...

    --Jason
    Jason Pitoniak
    Interbrite Communications
    www.interbrite.com www.kodiakskorner.com

  4. #4
    JPC Senior Member
    Join Date
    Mar 2003
    Posts
    74

    re

    thanks again for the reply.

    I will have alook at the source code for the page to try and find a hidden value that looks like it may be a tracking variable.

    With regards to the cookies, When the first page is opened, the following cookie is stored on my pc:

    MB_LANGUAGE
    EN
    moneybookers.com/
    1024
    583999616
    30310329
    1728084096
    29576074
    *
    what does this mean?
    This cookie stores my information in i guess. The trouble is, i cannot use my info, as the credit card payment providers won't let me pay myself (please dont ask why). Could anyone else try using this and see what cookie tey get?

    my url is www.no-1-plates.com/numberplate/plateini.php

    after putting your info in you should be redirected to moneybookers.com, and by then you should have their cookie. thanks

    thanks
    Last edited by davidstummer; 07-16-2003 at 01:21 AM.

  5. #5
    Community Leader jason's Avatar
    Join Date
    Sep 2001
    Location
    Rochester, NY
    Posts
    6,003
    Why? j/k

    Here's what I think the cookie means:

    MB_LANGUAGE - this is the name of the cookie
    EN - this is the value
    moneybookers.com/ - this is the website that will receive it

    I'm not sure about the numbers, although 1728084096 appears to be the expiry time for the cookie, in the form of a Unix timestamp (number of seconds since Jan 1, 1970). I also think that the * may be the path option, with the * meaning that the cookie will be sent to any page requested from that server (as opposed to something like /forums, where the cookie will only be sent with requests in the "forums" directory).

    So, long story short, this cookie appears to tell moneybrokers.com that you're prefered language is ENglish.

    Since English is apparently the default language of the site, this cookie probably isn't all that important to set. It is more important to see if any session cookies are set after the first form is submitted, as not setting these will likely cause the trasnsaction to fail on the second form.

    --Jason
    Jason Pitoniak
    Interbrite Communications
    www.interbrite.com www.kodiakskorner.com

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •