dailymotion/dailymotion-sdk-php — pull request #10 by lesmyrmidons (2012-04-05 14:44:41+00:00)
Title: Modify the processing of the return of the response of the method "httpRequest"

Here are the results (var_dump) of my header :
string(606) "HTTP/1.0 200 Connection established

HTTP/1.1 200 OK
Server: DMS/1.0.42
X-DM-BackNode: 195.8.215.129:80
Cache-Control: no-store
Content-Type: application/json
P3p: policyref="http://www.dailymotion.com/w3c/p3p.xml", CP="IDC DSP CURa ADMa DEVa TAIa OUR BUS IND UNI COM NAV INT"
Date: Thu, 05 Apr 2012 13:02:42 GMT
Keep-Alive: timeout=60, max=5000
Connection: Keep-Alive
Set-Cookie: tg=49029; expires=Tue, 05-Apr-2022 13:02:42 GMT; path=/
X-Dm-Page: fr.html.oauth
Content-Length: 108

{"access_token":"token","expires_in":36000,"refresh_token":null,"scope":"","uid":null}"

Here the size returned by $info['header_size'] :
460

Result of $headers_str :
string(460) "HTTP/1.0 200 Connection established

HTTP/1.1 200 OK
Server: DMS/1.0.42
X-DM-BackNode: 195.8.215.130:80
Cache-Control: no-store
Content-Type: application/json
P3p: policyref="http://www.dailymotion.com/w3c/p3p.xml", CP="IDC DSP CURa ADMa DEVa TAIa OUR BUS IND UNI COM NAV INT"
Date: Thu, 05 Apr 2012 13:18:07 GMT
Keep-Alive: timeout=60, max=5000
Connection: Keep-Alive
Set-Cookie: tg=979112; expires=Tue, 05-Apr-2022 13:18:07 GMT; path=/
X-Dm-Page:"

We are obliged to make the upstream treatment works for my case.
So I use the variable "$ info ['download_content_length']" to get the 'Content-Length'.