How do I send a POST request with PHP?

前端 未结 13 1880
暗喜
暗喜 2020-11-21 05:40

Actually I want to read the contents that come after the search query, when it is done. The problem is that the URL only accepts POST methods, and it does not t

13条回答
  •  北恋
    北恋 (楼主)
    2020-11-21 06:01

    [Edit]: Please ignore, not available in php now.

    There is one more which you can use

     'mike',
        'pass' => 'se_ret'
    );
    $files = array(
        array(
            'name' => 'uimg',
            'type' => 'image/jpeg',
            'file' => './profile.jpg',
        )
    );
    
    $response = http_post_fields("http://www.example.com/", $fields, $files);
    ?>
    

    Click here for details

提交回复
热议问题