Mutikasa
Power Member
- May 23, 2011
- 589
- 216
This is not really specific PHP, but since I want to do this with PHP it goes here.
anyway, this is how POST request for uploading Youtube looks like:
POST /feeds/api/users/default/uploads HTTP/1.1
Host: uploads.gdata.youtube.com
Authorization: AuthSub token="<authentication_token>"
GData-Version: 2
X-GData-Key: key=<developer_key>
Slug: <video_filename>
Content-Type: multipart/related; boundary="<boundary_string>"
Content-Length: <content_length>
Connection: close
--<boundary_string>
Content-Type: application/atom+xml; charset=UTF-8
API_XML_request
--<boundary_string>
Content-Type: <video_content_type>
Content-Transfer-Encoding: binary
<Binary File Data>
--<boundary_string>
Now, what i don't understand is <Binary File Data>.
This is what Google says:
Binary File Data - This value contains the binary code for the video file that is being uploaded.
how do I get that binary code?
anyway, this is how POST request for uploading Youtube looks like:
POST /feeds/api/users/default/uploads HTTP/1.1
Host: uploads.gdata.youtube.com
Authorization: AuthSub token="<authentication_token>"
GData-Version: 2
X-GData-Key: key=<developer_key>
Slug: <video_filename>
Content-Type: multipart/related; boundary="<boundary_string>"
Content-Length: <content_length>
Connection: close
--<boundary_string>
Content-Type: application/atom+xml; charset=UTF-8
API_XML_request
--<boundary_string>
Content-Type: <video_content_type>
Content-Transfer-Encoding: binary
<Binary File Data>
--<boundary_string>
Now, what i don't understand is <Binary File Data>.
This is what Google says:
Binary File Data - This value contains the binary code for the video file that is being uploaded.
how do I get that binary code?