PHP curl 实现RESTful PUT DELETE 实例
客户端 client.php <?php //PUT $curl_handle = curl_init (); // Set default options. curl_setopt ( $curl_handle, CURLOPT_URL, 'http://my.focus.cn/test/socket.php'); curl_setopt ( $curl_handle, CURLOPT_FILETIME, true ); curl_setopt ( $curl_handle, CURLOPT_FRESH_CONNECT, false ); curl_setopt ( $curl_handle, CURLOPT_HEADER, true ); curl_setopt ( $curl_handle, CURLOPT_RETURNTRANSFER, true ); curl_setopt ( $curl_handle, CURLOPT_TIMEOUT, 5184000 ); curl_setopt ( $curl_handle, CURLOPT_CONNECTTIMEOUT, 120 ); curl_setopt ( $curl_handle, CURLOPT_NOSIGNAL, true ); curl_setopt ( $curl_handle, CURLOPT_HEADER,