diff --git a/Update/update-php.php b/Update/update-php.php index 2e116b0..2a69ffd 100644 --- a/Update/update-php.php +++ b/Update/update-php.php @@ -1,12 +1,13 @@ -$data = '{ - "accountname" : "מושון" - }'; +$data = array( + "accountname" => "מושון" +); $objectid = '332DB2BF-3694-4F80-B82F-99F87B5AAB56'; -$url='https://secure.powerlink.co.il/api/record/account/'.$objectid -$data_string = json_encode($data); +$url='https://api.powerlink.co.il/api/record/account/'.$objectid +$data_string = json_encode($data); + $curl = curl_init(); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PUT"); -curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($data)); +curl_setopt($curl, CURLOPT_POSTFIELDS, $data_string); curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC); curl_setopt($curl, CURLOPT_URL, $url); curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);