It's only fair to share...Share on Facebook0Share on Google+0Tweet about this on Twitter0Share on LinkedIn0Pin on Pinterest1Digg thisShare on StumbleUpon0

curl post

To use PHP CURL functions, first we have to enable libcurl library. It will allow us to connect from various servers by different protocols.Most of the payment gateways using CURL for taking request from merchant server. In this tutorial we are going to explain how to make an HTTP POST with PHP and CURL passing several form fields.

How does it Work?
All CURL requests follow the same basic pattern:

  1. First initialize the CURL resource by calling the curl_init() function.
  2. Next we set various options, such as the URL, request method, payload data, etc. Options can be set individually with curl_setopt(), or we can pass an array of options to curl_setopt_array().
  3. Then we execute the request by calling curl_exec().
  4. Finally, we free the resource to clear out memory.



Leave a Reply

Your email address will not be published. Required fields are marked *


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">