@@ -86,6 +86,9 @@ |
||
86 | 86 | return ftell($fp); |
87 | 87 | } |
88 | 88 | |
89 | + /** |
|
90 | + * @param string $filename |
|
91 | + */ |
|
89 | 92 | private function curl_file_create($filename, $mimetype = '', $postname = '') { |
90 | 93 | if (!function_exists('curl_file_create')) { |
91 | 94 |
@@ -54,10 +54,10 @@ discard block |
||
54 | 54 | |
55 | 55 | curl_setopt($ch, CURLOPT_POST, 1); |
56 | 56 | curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); |
57 | - curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); |
|
58 | - curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 60); |
|
59 | - curl_setopt($ch, CURLOPT_TIMEOUT, 1200); |
|
60 | - curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); |
|
57 | + curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); |
|
58 | + curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 60); |
|
59 | + curl_setopt($ch, CURLOPT_TIMEOUT, 1200); |
|
60 | + curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); |
|
61 | 61 | |
62 | 62 | curl_setopt($ch, CURLOPT_POSTFIELDS, $send_array ); |
63 | 63 | curl_setopt($ch, CURLOPT_VERBOSE, true); |
@@ -89,9 +89,9 @@ discard block |
||
89 | 89 | private function curl_file_create($filename, $mimetype = '', $postname = '') { |
90 | 90 | if (!function_exists('curl_file_create')) { |
91 | 91 | |
92 | - return "@$filename;filename=" |
|
93 | - . ($postname ?: basename($filename)) |
|
94 | - . ($mimetype ? ";type=$mimetype" : ''); |
|
92 | + return "@$filename;filename=" |
|
93 | + . ($postname ?: basename($filename)) |
|
94 | + . ($mimetype ? ";type=$mimetype" : ''); |
|
95 | 95 | |
96 | 96 | }else{ |
97 | 97 |