How to force Curl to close the connection after response? [PHP Code]

Close Сonnection means that the client or server wants to close the connection after finishing the HTTP transaction. The Curl client can tell the server that it wants to close the connection by sending the "Connection: close" header to the server. To pass the "Connection: close" header to Curl, you can use the -H command-line option. In this Curl Close Connection example, we are sending a request to the ReqBin echo URL. Click Run to execute the Curl example online and see the results. The PHP code was automatically generated for the Curl Close Connection Header example.
Loading...