Skip to content

Instantly share code, notes, and snippets.

@luishdez
Created July 17, 2010 15:09
Show Gist options
  • Select an option

  • Save luishdez/479565 to your computer and use it in GitHub Desktop.

Select an option

Save luishdez/479565 to your computer and use it in GitHub Desktop.
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $ticket_location);
curl_setopt($ch, CURLOPT_HEADER, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-type: text/xml"));
$xml = "<ticket><comment><value>$value</value><is_public>$is_public</is_public></comment><uploads>$token</uploads></ticket>";
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PUT");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $xml);
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
curl_setopt($ch, CURLOPT_USERPWD, "$email:$password");
curl_exec($ch);
curl_close($ch);
@zkenstein

Copy link
Copy Markdown

Tried this, but the value not pass, also use this {$value}, but the value not updated same like before any idea?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment