Forms 使用PUT方法和卷曲填充表单

Forms 使用PUT方法和卷曲填充表单,forms,automation,header,put,autofill,Forms,Automation,Header,Put,Autofill,我需要填写表格,然后将数据发送到服务器。为了模拟表单填充和按钮提交,我尝试使用PUT方法和cURL,但没有成功。 我不知道我做错了什么,因为我在使用cURL方面不是很有经验。谢谢大家的帮助 当我手动提交表格时,我可以看到这些标题: 这是我的代码: $data = array( 'authenticity_token' => 'uGjjg9Jv4E5s4FE9e6afza9v1ycIR9sdAAnvmjcGf8YeUl0+UzpsaT5p/I/LIFs/kbOb7g4TmWx5Pq+TGt7

我需要填写表格,然后将数据发送到服务器。为了模拟表单填充和按钮提交,我尝试使用PUT方法和cURL,但没有成功。 我不知道我做错了什么,因为我在使用cURL方面不是很有经验。谢谢大家的帮助

当我手动提交表格时,我可以看到这些标题:

这是我的代码:

$data = array(
'authenticity_token' => 'uGjjg9Jv4E5s4FE9e6afza9v1ycIR9sdAAnvmjcGf8YeUl0+UzpsaT5p/I/LIFs/kbOb7g4TmWx5Pq+TGt7V1Q==',
'show_preview' => '1',
'product[international]' => '0',

// *** THERE IS MUCH MORE FIELDS IN ARRAY HERE, ACCORDING TO HEADERS

'product[auto_renewable]' => 'true',
'button' => ''
); 

$curl = curl_init('http://en.dawanda.com/seller/products/new');

curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'PUT');
curl_setopt($curl, CURLOPT_HEADER, true);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_HTTPHEADER, array('Content-Type: application/x-www-form-urlencoded','authenticity_token:   uGjjg9Jv4E5s4FE9e6afza9v1ycIR9sdAAnvmjcGf8YeUl0+UzpsaT5p/I/LIFs/kbOb7g4TmWx5Pq+TGt7V1Q=='));
curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($data));

$response = curl_exec($curl);