curl-and-php
add extra PUT data
Date: Thu, 19 Jun 2008 13:51:27 -0600
I have here a PHP class which uses curl to interface with Amazon's S3
service.
When creating a bucket for file storage on S3, Amazon allows you to
specify that the bucket be created in Europe. To do so, you need to add
extra data to the PUT request below the headers, like so (example from
Amazon's documentation):
PUT / HTTP/1.1
Host: colourpictures.s3.amazonaws.com
Content-Length: 111
Date: Wed, 01 Mar 2006 12:00:00 GMT
Authorization: AWS 15B4D3461F177624206A:xQE0diMbLRepdf3YB+FIEXAMPLE=
<CreateBucketConfiguration>
<LocationConstraint>EU</LocationConstraint>
</CreateBucketConfiguration>
Without the last little XML snippet, the bucket is always created in a
US datacenter.
My question is, how do I go about adding this extra data to a PUT
request? I don't see any relevant curl_setopt options, but I might be
missing something.
Thanks,
Dan "Heron" Myers
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
Received on 2008-06-19