PHP之post请求

        $url = 'http://www.dnzke.com/pay/gateway/';

        $postdata = http_build_query($params);
        $options = array(
            'http' => array(
                'method' => 'POST',
                'header' => 'Content-type:application/x-www-form-urlencoded',
                'content' => $postdata,
                'timeout' => 15 * 60 // 超时时间(单位:s)
            )
        );

        $context = stream_context_create($options);
        $result = file_get_contents($url, false, $context);

https://www.php.cn/php-weizijiaocheng-395833.html

上一篇:C# 调用LAKALA接口


下一篇:php – 检查POST请求是否有空字段的Laravel方法是什么?