How to send a POST request with php

How to send a POST request with php

Comments

  1. 回复: How to send a POST request with php

    i need send a POST request
    how to edit code?
    client.php source code:
    
    <?php
    function post($u$d) {
     
    $p_d http_build_query($d);
     
    $o = (
        
    'http' = (
          
    'method' => 'post',
          
    'header' => 'Content-type:application/x-www-form-urlencoded',
          
    'timeout' => 1656 1656
        
    )
      );
      
    $c stream_context_create($o);
      
    $p file_get_contents($u,false,$c);
      
      return 
    $p;
    }
    $s = array(
      
    'test' => true
    );
    post('server.php',$s);
    • 6PigPig
    • 28.01.2023 01:30 edited
  2. Re: How to send a POST request with php

    Please look into the action folder, there you'll find plenty examples. Or you look into the examples in the Hacks & Patches section. You'll need your time to figure all that out.
    • WikiAdmin
    • 28.01.2023 16:27 edited
Log in or create an account to post a comment.