The basic function of curl post request is first you initialize a session using the curl_init() function ans then set all option for transfer through curt_setopt() function then and the execute your session with curl_exec() function and after all finish your request usingcurl_close() function.
A Simple Curl Post Http request
<?php // initialize session $ch = curl_init(); //url using for request curl_setopt($ch, CURLOPT_URL,"http://www.example.com"); //request mehod curl_setopt($ch, CURLOPT_POST, 1); //number of field want to curl_setopt($ch, CURLOPT_POSTFIELDS,"postvar1=value1&postvar2=value2&postvar3=value3"); //for receive response of server curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); // session executed and hold response in $server_response variable $server_response = curl_exec ($ch); ?>
Hello, My Name is pradip parker . I am a Web Developer, Professional Blogger from India. i love and like web designing and developing, i have two year of experience in programming and developing I am the founder of programmingconcept. I started this blog in 2017 to for help developers by providing easy,small and best tutorials.
thanks for this post
Thanks a lot for providing individuals with an extraordinarily wonderful opportunity to check tips from this web site. It is usually very pleasing and as well , jam-packed with a lot of fun for me and my office mates to search the blog at the least three times in a week to read the latest secrets you have got. And indeed, I am also at all times happy with all the eye-popping information you give. Some 1 tips in this article are unequivocally the very best I have had.
Respect to website author , some wonderful entropy.