Как я могу автоматически сохранять настройки на своей странице eBay через PHP curl?
Пока что я создал этот код, но он не работает.Есть идеи, что я делаю не так?
$data = array('svcid' => 'MYEBAY_NOTIFICATION_PREF_SERVICE',
'stok' => $stok,
'pId' => '3984',
'v' => '0',
'reqttype' => 'NVPAIR',
'resptype' => 'JSON',
'clientType' => 'Safari:537:',
'request' => 'formId=BUYINGACTIVITY&siteId=3&type=4&ipAddress=&srt='.$srt.'&buyingActivityParams=|#%emailFreq_11000^:!2|#%emailFreq_11002^:!2|#%emailFreq_11003^:!2|#%emailFreq_11001^:!2|#%emailFreq_11101^:!2|#%emailFreq_11102^:!2|#%emailFreq_11013^:!2|#%emailFreq_11010^:!2|#%emailFreq_11011^:!2|#%emailFreq_11070^:!2|#%emailFreq_12512^:!2|#%emailFreq_11401^:!2|#%emailFreq_11400^:!2|#%emailFreq_11402^:!2|#%emailFreq_11404^:!2|#%emailFreq_11922^:!1|#%emailFreq_11923^:!2|#%emailFreq_11924^:!2|#%emailFreq_11925^:!2|#%emailFreq_11926^:!2|#%emailFreq_11927^:!2|#%emailFreq_11928^:!2|#%emailFreq_11929^:!2|#%emailFreq_11930^:!2|#%emailFreq_13802^:!2|#%emailFreq_11240^:!2|#%emailFreq_11241^:!2|#%formId_BUYINGACTIVITY^:!false|#%BUYINGACTIVITY_form_anyFieldChanged^:!true|#%^:!Save');
$data_string = json_encode($data);
$ch = curl_init('https://my.ebay.co.uk/V4Ajax');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data_string));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER , false);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json','Content-Length: ' . strlen($data_string)));
$result = curl_exec($ch);
var_dump(curl_getinfo($ch), $result);
curl_close($ch);