[php cURL] File upload

Discussion in 'PHP' started by ExTeNsIoN, Feb 21, 2010.

  1. #1
    While uploading a file to a server, do we need to setup some headers in cutl_setopt???

    I m tryin to upload somethin but then it doesnt get uploaded and blank page returns.

    can anyone help?
     
    ExTeNsIoN, Feb 21, 2010 IP
  2. darkblade

    darkblade Peon

    Messages:
    187
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Hi, Iam not expert at curl. but have you tried curl_getinfo()? Should get something to debug.
     
    darkblade, Feb 23, 2010 IP
  3. Kaizoku

    Kaizoku Well-Known Member

    Messages:
    1,261
    Likes Received:
    20
    Best Answers:
    1
    Trophy Points:
    105
    #3
    There are 2 important options you need to set.

    CURLOPT_POST, TRUE
    CURLOPT_POSTFIELDS, $array
     
    Kaizoku, Feb 24, 2010 IP