Skip to content

Instantly share code, notes, and snippets.

@cirpo
Created November 13, 2010 08:25
Show Gist options
  • Select an option

  • Save cirpo/675188 to your computer and use it in GitHub Desktop.

Select an option

Save cirpo/675188 to your computer and use it in GitHub Desktop.
<?php
$url = "http://example.org";
$curlSession = curl_init();
$putParameters = array('email' => '[email protected]', 'username' => 'pluto');
curl_setopt($curlSession,CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($curlSession,CURLOPT_URL, $url);
curl_setopt($curlSession, CURLOPT_CUSTOMREQUEST, 'PUT');
curl_setopt($curlSession,CURLOPT_POSTFIELDS, http_build_query($putParameters));
curl_setopt($curlSession,CURLOPT_RETURNTRANSFER, 1);
$output = curl_exec($curlSession);
curl_close($curlSession);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment