Created
March 6, 2012 16:50
-
-
Save christeredvartsen/1987441 to your computer and use it in GitHub Desktop.
PUT with file_get_contents
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
file_get_contents($url, null, stream_context_create(array( | |
'http' => array( | |
'method' => 'PUT', | |
'content' => json_encode(array('foo' => 'bar')), | |
'header' => 'Content-type: application/x-www-form-urlencoded', | |
) | |
))); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment