~~~ ~~~ function send_post($url, $post_data) { $result = file_get_contents($url, false, stream_context_create([ 'http'=>[ 'method' => 'POST', 'header' => 'Content-type:application/x-www-form-urlencoded', 'content' => http_build_query($post_data), 'timeout' => 15 * 60 // 超时时间(单位:s) ], ])); return $result; } ~~~ ~~~