2
2
/*
3
3
4
4
Zencoder API PHP Library
5
- Version: 1.2
5
+ Version: 1.6
6
6
See the README file for info on how to use this library.
7
7
8
8
*/
9
9
define ('ZENCODER_LIBRARY_NAME ' , "ZencoderPHP " );
10
- define ('ZENCODER_LIBRARY_VERSION ' , "1.5 " );
10
+ define ('ZENCODER_LIBRARY_VERSION ' , "1.6 " );
11
11
12
12
// Add JSON functions for PHP < 5.2.0
13
13
if (!function_exists ('json_encode ' )) {
@@ -177,7 +177,6 @@ class ZencoderCURL {
177
177
CURLOPT_RETURNTRANSFER => 1 , // Return content of the url
178
178
CURLOPT_HEADER => 0 , // Don't return the header in result
179
179
CURLOPT_HTTPHEADER => array ("Content-Type: application/json " , "Accept: application/json " ),
180
- CURLOPT_USERAGENT => ZENCODER_LIBRARY_NAME . " " . ZENCODER_LIBRARY_VERSION ,
181
180
CURLOPT_CONNECTTIMEOUT => 0 , // Time in seconds to timeout send request. 0 is no timeout.
182
181
CURLOPT_FOLLOWLOCATION => 1 , // Follow redirects.
183
182
CURLOPT_SSL_VERIFYPEER => 1 ,
@@ -200,6 +199,7 @@ function ZencoderCURL($url, $json, $options = array()) {
200
199
// Add library details to request
201
200
$ this ->options [CURLOPT_HTTPHEADER ][] = "Zencoder-Library-Name: " .ZENCODER_LIBRARY_NAME ;
202
201
$ this ->options [CURLOPT_HTTPHEADER ][] = "Zencoder-Library-Version: " .ZENCODER_LIBRARY_VERSION ;
202
+ $ this ->options [CURLOPT_USERAGENT ] = ZENCODER_LIBRARY_NAME . " " . ZENCODER_LIBRARY_VERSION ;
203
203
204
204
// If posting data
205
205
if ($ json ) {
0 commit comments