cURL POST torrent file

Discussion in 'Programming/Scripts' started by activpanel, Jan 29, 2015.

  1. activpanel

    activpanel New Member


    I would like to make a HTTP POST request with curl, sending data and files.

    I tried this:

    curl -i -X POST -H "Content-Type: multipart/form-data" -F "name=Bilan" -F "[email protected]" http://localhost/upload.php
    without success. I think I have a problem with the content-Type, the torrent file was not sent (maybe).

    What should I do?

    Thanks for your help.
  2. sjau

    sjau Local Meanie Moderator

    If you have firefox try this:

    1) Install Firebug addon
    2) Go to the website where you want to make the post request to
    3) Open Firebug with F12
    4) In Firebut go to the "Net" tab and make sure it shows "All"
    5) Enter the data you in the form
    6) Press submit on the form
    7) In Firebug you see now very likely a few GET and one POST query
    8) Right-click the POST query and select "Copy as cURL"
    9) Compare it with what you've got

Share This Page