Curl is used to communicate with different servers. It also supports different protocols like http, https, ftp, telnet and file protocols for communication. Libcurl also supports HTTPS certificate. \nI already covered curl get request<\/a> tutorial in my previous posts but in this tutorial I am going to show you how to use php curl post request with parameters.<\/strong> <\/p>\n\nPHP CURL POST:<\/h2>\nFollowing are the CURL options we are going to use in curl post request. There are other lots of option which you can use with curl_setopt(). For more details visit php curl_setopt<\/a><\/p>\n
\n\n\t
\n\t\t Option<\/strong><\/th>\n\t\t Value<\/strong><\/th>\n\t<\/tr>\n\t \n\t\t CURLOPT_URL<\/td>\n\t\t Request URL<\/td>\n\t<\/tr>\n\t \n\t\t CURLOPT_HEADER<\/td>\n\t TRUE to include the header in the output. <\/td>\n\t<\/tr>\n\t \n\t\t CURLOPT_RETURNTRANSFER<\/td>\n\t\t TRUE to return the transfer as a string of the return value of curl_exec() instead of outputting it out directly. <\/td>\n\t<\/tr>\n\t\n\t \n\t\t CURLOPT_CONNECTTIMEOUT<\/td>\n\t\t The number of seconds to wait while trying to connect. Use 0 to wait indefinitely<\/td>\n\t<\/tr>\n\t \n\t\t CURLOPT_POST<\/td>\n\t\t TRUE to do a regular HTTP POST. This POST is the normal application\/x-www-form-urlencoded kind, most commonly used by HTML forms.<\/td>\n\t<\/tr>\n\t \n\t\t CURLOPT_POSTFIELDS<\/td>\n\t\t The full data to post in a HTTP \u201cPOST\u201d operation. To post a file, prepend a filename with @ and use the full path. The filetype can be explicitly specified by following the filename with the type in the format \u2018;type=mimetype\u2019. This parameter can either be passed as a urlencoded string like \u2018para1=val1¶2=val2&\u2026\u2019 or as an array with the field name as key and field data as value.<\/td>\n\t<\/tr>\n\t \n\t\t CURLOPT_SSL_VERIFYPEER<\/td>\n\t\t FALSE to stop cURL from verifying the peer\u2019s certificate.<\/td>\n\t<\/tr>\n<\/tbody><\/table>\n\n
\n