A small example of using phpcurl to simulate post requests ., Curlpost. A small example of using phpcurl to simulate post requests ., Curlpost1, local Machine :? Php $ uriwww. jbxue. comtest. php; replace the address parameter array of your server with $ dat. use php curl to simulate a small example of post request ., Curlpost
1. local machine:
'Tanteng' // 'password' => 'password'); $ ch = curl_init (); // print_r ($ ch); curl_setopt ($ ch, CURLOPT_URL, $ uri); curl_setopt ($ ch, CURLOPT_POST, 1); curl_setopt ($ ch, CURLOPT_HEADER, 0); curl_setopt ($ ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt ($ ch, CURLOPT_POSTFIELDS, $ data); $ return = curl_exec ($ ch); curl_close ($ ch); print_r ($ return );
2. remote server:
A small example of using curl to simulate post requests ., Curlpost 1, local Machine :? Php $ uri = "http://www.jbxue.com/test.php"; // replace the address of your server here // parameter array $ dat...