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

Post Top Ad

Post Top Ad

Friday, February 2, 2018

sUPERCODER%2BLOGO

PHP Curl Post Tutorial

PHP Curl Post Tutorial

phpcurl


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

3 comments:

  1. download+1

    This is my first time i visit here and I found so many interesting stuff in your blog especially it's discussion, thank you. best graco pack n play

    ReplyDelete
  2. blogger_logo_round_35

    A few organizations will make Content Administration Frameworks (CMS).Webdesign

    ReplyDelete
  3. blogger_logo_round_35

    The creation was worried about proficient memory the executives for the simplex calculation, and might be actualized by absolutely software implies.itools 4 crack license key free download

    ReplyDelete

Post Top Ad