sending multidimensional JSON data via PHP cURL -


i'm developing http client , choose php curl extension make http request. api needs multidimensional json parameter.

    $jsondata = json_encode($data);      $ch = curl_init();     curl_setopt($ch, curlopt_url,$url);     curl_setopt($ch, curlopt_post,1);     curl_setopt($ch, curlopt_postfields, $jsondata);     curl_setopt($ch, curlopt_returntransfer, 1);     curl_setopt($ch, curlopt_httpheader, array(             'content-type: application/json',             'content-length: ' . strlen($jsondata))     );      $response = curl_exec($ch);     curl_close($ch); 

when use snippet single script file , try in php cli works in laravel not working. error "maximum execution time of 60 secods exceeded."

when stackoverflow examples use single dimensional json objects,

  • is there restriction in php curl settings json dimensions ?
  • when search error mentioned above related "max_input_time = 60" when change 120 or higher error message didn't changed.

  • i'm using laravel framework , laravel have configuration related this.

have tried using http_build_query() instead of json_encode()?

as far know there no restrictions json dimensions on php curl. i've never worked laravel though


Comments

Popular posts from this blog

java - Run spring boot application error: Cannot instantiate interface org.springframework.context.ApplicationListener -

python - pip wont install .WHL files -

Excel VBA "Microsoft Windows Common Controls 6.0 (SP6)" Location Changes -