<p>This example is always great when wanting to send a POST request through curl (e.g. communicating with an external REST API): http://davidwalsh.name/curl-post. </p>
<p>It has some extra information how the concepts work, but also don't give too much information.</p>
<p>All CURL options can be found here: http://php.net/manual/en/function.curl-setopt.php. And the appropriate CURL commands: http://php.net/manual/en/ref.curl.php.</p>
<p>Always make sure you check HTTP return codes (e.g. if it's a 200 OK code) and make sure to use a secure connection whenever possible. Also specify timeouts if you want to return information to the client side in the same request.</p>
Get New Tutorials Delivered to Your Inbox
New tutorials will be sent to your Inbox once a week.