22/*
33
44 Zencoder API PHP Library
5- Version: 1.2
5+ Version: 1.6
66 See the README file for info on how to use this library.
77
88*/
99define ('ZENCODER_LIBRARY_NAME ' ,"ZencoderPHP " );
10- define ('ZENCODER_LIBRARY_VERSION ' ,"1.5 " );
10+ define ('ZENCODER_LIBRARY_VERSION ' ,"1.6 " );
1111
1212// Add JSON functions for PHP < 5.2.0
1313if (!function_exists ('json_encode ' )) {
@@ -177,7 +177,6 @@ class ZencoderCURL {
177177CURLOPT_RETURNTRANSFER =>1 ,// Return content of the url
178178CURLOPT_HEADER =>0 ,// Don't return the header in result
179179CURLOPT_HTTPHEADER =>array ("Content-Type: application/json " ,"Accept: application/json " ),
180- CURLOPT_USERAGENT =>ZENCODER_LIBRARY_NAME ." " .ZENCODER_LIBRARY_VERSION ,
181180CURLOPT_CONNECTTIMEOUT =>0 ,// Time in seconds to timeout send request. 0 is no timeout.
182181CURLOPT_FOLLOWLOCATION =>1 ,// Follow redirects.
183182CURLOPT_SSL_VERIFYPEER =>1 ,
@@ -200,6 +199,7 @@ function ZencoderCURL($url, $json, $options = array()) {
200199// Add library details to request
201200$ this ->options [CURLOPT_HTTPHEADER ][] ="Zencoder-Library-Name: " .ZENCODER_LIBRARY_NAME ;
202201$ this ->options [CURLOPT_HTTPHEADER ][] ="Zencoder-Library-Version: " .ZENCODER_LIBRARY_VERSION ;
202+ $ this ->options [CURLOPT_USERAGENT ] =ZENCODER_LIBRARY_NAME ." " .ZENCODER_LIBRARY_VERSION ;
203203
204204// If posting data
205205if ($ json ) {