Automatic form submission with PHP

Discussion in 'PHP' started by adamjthompson, May 11, 2006.

  1. #1
    Hello,

    Is it possible to use PHP to automatically submit a form without the user filling it out and submitting it? (the form will be using hidden values) How do I get PHP to submit the form?

    ~Adam
     
    adamjthompson, May 11, 2006 IP
  2. mad4

    mad4 Peon

    Messages:
    6,986
    Likes Received:
    493
    Best Answers:
    0
    Trophy Points:
    0
  3. tech86

    tech86 Peon

    Messages:
    83
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Curl is your friend

    php.net/curl
     
    tech86, May 11, 2006 IP
  4. EWD

    EWD Well-Known Member

    Messages:
    1,688
    Likes Received:
    85
    Best Answers:
    0
    Trophy Points:
    155
    #4
    Quite possible. Just make the script so that it sends out a mail to you as soon as the page is loaded.
     
    EWD, May 11, 2006 IP
  5. adamjthompson

    adamjthompson Well-Known Member

    Messages:
    1,242
    Likes Received:
    59
    Best Answers:
    0
    Trophy Points:
    125
    #5
    Thanks! I found the solution in the tutorials, Mad4.
     
    adamjthompson, May 11, 2006 IP
  6. irunbackwards

    irunbackwards Peon

    Messages:
    791
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    0
    #6
    I personally would use cURL, but you can also use regular html/javascript.
     
    irunbackwards, May 15, 2006 IP
  7. Hoth

    Hoth Well-Known Member

    Messages:
    51
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    101
    #7
    A lot of hosts disabled fopen url wrappers due a security issue a while back, but then there are some other hosts that don't offer curl. Best to test for curl and fall back on fsockopen if it's not available.
     
    Hoth, May 15, 2006 IP