PHP Curl Post Tutorial - Web Development and Design | Tutorial for Java, PHP, HTML, Javascript PHP Curl Post Tutorial - Web Development and Design | Tutorial for Java, PHP, HTML, Javascript

Breaking

Post Top Ad

Post Top Ad

Friday, February 2, 2018

PHP Curl Post Tutorial

PHP Curl Post Tutorial

PHP Curl Post Tutorial


Code : - 
<?php
$url="https://reqres.in/api/users";
$ch=curl_init();
curl_setopt($ch,CURLOPT_URL,$url);
curl_setopt($ch,CURLOPT_POST,true);
curl_setopt($ch,CURLOPT_POSTFIELDS,"name=test&job=dev");
curl_setopt($ch,CURLOPT_RETURNTRANSFER,TRUE);
$html=curl_exec($ch);
echo $html;
?>

This is same as loading a webpage using php curl here in this we set two more option. 1.post=true for posting data 2.postfields = which is our post data.

Video Tutorial

6 comments:

  1. Hey Nice Blog!! Thanks For Sharing!!!Wonderful blog & good post.Its really helpful for me, waiting for a more new post. Keep Blogging!
    php training with placement in coimbatore
    digital marketing training in coimbatore

    ReplyDelete
  2. Thanks for sharing an information to us. If someone wants to know about websites and SEO Service. I think this is the right place for you!
    Digital Marketing
    SEO Company

    ReplyDelete
  3. This is really a worthy and wonderful blog to read and further more tips on the web designing have been learnt. thanks for sharing your views among us and its great time spending on this. thank you Marble slabs Sydney

    ReplyDelete
  4. The essential guideline for webdesign demonstrates that the guest ought to have the capacity to locate the ideal data, if present, inside the underlying three ticks of the mouse.Webdesign Webshop

    ReplyDelete
  5. It was wondering if I could use this write-up on my other website, I will link it back to your website though.Great Thanks. Webdesign bureau

    ReplyDelete

Post Top Ad