@@ -167,7 +167,7 @@ public function call($module, $function, $args = array())
167
167
CURLOPT_RETURNTRANSFER => true ,
168
168
CURLOPT_ENCODING => "" ,
169
169
CURLOPT_MAXREDIRS => 10 ,
170
- CURLOPT_TIMEOUT => 100020 ,
170
+ CURLOPT_TIMEOUT => 30 ,
171
171
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1 ,
172
172
CURLOPT_CUSTOMREQUEST => "GET " ,
173
173
CURLOPT_POSTFIELDS => "" ,
@@ -183,15 +183,15 @@ public function call($module, $function, $args = array())
183
183
184
184
curl_close ($ curl );
185
185
186
-
187
186
$ response ['inputs ' ]['url ' ] = $ url ;
188
- $ response ['data ' ]['header_size ' ] = $ header_size ;
189
- $ response ['data ' ]['header ' ] = $ header ;
190
- $ response ['data ' ]['response ' ] = json_decode ($ curl_res );
191
- $ response ['data ' ]['body ' ] = $ body ;
192
- $ response ['data ' ]['error ' ] = $ err ;
193
- $ response ['data ' ]['err_no ' ] = $ err_no ;
194
-
187
+ $ response ['curl_response ' ] = [
188
+ 'header_size ' => $ header_size ,
189
+ 'header ' => $ header ,
190
+ 'response ' => $ curl_res ,
191
+ 'body ' => $ body ,
192
+ 'error ' => $ err ,
193
+ 'err_no ' => $ err_no ,
194
+ ];
195
195
196
196
if ($ err || $ err_no ) {
197
197
@@ -207,6 +207,7 @@ public function call($module, $function, $args = array())
207
207
$ response ['inputs ' ]['url ' ] = $ url ;
208
208
} else
209
209
{
210
+ $ response ['data ' ] = json_decode ($ curl_res );
210
211
$ response ['status ' ] = 'success ' ;
211
212
$ response ['inputs ' ]['url ' ] = $ url ;
212
213
}
0 commit comments