Help:Using Post with CURL

Discussion in 'PHP' started by linkinpark2014, Jan 26, 2009.

  1. #1
    hi

    I have this form for specific website and I want to post my values with curl

    <form name=quickreply action="" method=post>
    <input type=button onclick='submitQuickReplyForm(1)' value="Submit the value">
    <textarea name=msg ></textarea>
    </form>
    Code (markup):

    here is what i did (highlighted part):


    so is there anything wrong with my code?
    what do i need to input for the button exactly?
     
    linkinpark2014, Jan 26, 2009 IP
  2. plog

    plog Peon

    Messages:
    298
    Likes Received:
    11
    Best Answers:
    1
    Trophy Points:
    0
    #2
    First, why do you want to use curl? Second, I think your mixing Javascript and php. $curlPost is a php variable and submitQuickReplyForm(1) is a Javascript function. I don't think you're going to pass the correct information through curl.
     
    plog, Jan 26, 2009 IP
  3. bartolay13

    bartolay13 Active Member

    Messages:
    735
    Likes Received:
    14
    Best Answers:
    1
    Trophy Points:
    98
    #3
    i think your trying to integrate js func to php string then call it into a php function.
    what are you doing exactly?
     
    bartolay13, Jan 26, 2009 IP
  4. Kaizoku

    Kaizoku Well-Known Member

    Messages:
    1,261
    Likes Received:
    20
    Best Answers:
    1
    Trophy Points:
    105
    #4
    The post postdata inside an array.

    $curlPost['key1'] = 'value1';
    $curlPost['key2'] = 'value2';
     
    Kaizoku, Jan 26, 2009 IP
  5. linkinpark2014

    linkinpark2014 Peon

    Messages:
    153
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #5
    to be more clear, 1st I'm using CURL coz I want to post some replies on my forum..
    2nd, from what u're saying I understand that I cannot use curl to post the data of js button? so that means its impossible? or i need to add correct info?

    thanx for ur help :)
     
    linkinpark2014, Jan 27, 2009 IP
  6. linkinpark2014

    linkinpark2014 Peon

    Messages:
    153
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #6
    how to do this?
    means how can I integrate that function with php? can u give me an example or a guide?
     
    linkinpark2014, Jan 27, 2009 IP