Answers for "curl with -l php"

9

php curl

// set post fields
$post = [
    'username' => 'user1',
    'password' => 'passuser1',
    'gender'   => 1,
];

$ch = curl_init('http://www.example.com');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);

// execute!
$response = curl_exec($ch);

// close the connection, release resources used
curl_close($ch);

// do anything you want with your response
var_dump($response);
Posted by: Guest on May-15-2020
0

php curl

$data = json_encode(array(
    "ShortCode" => "600981",
    "ResponseType" => "Completed",
    "ConfirmationURL" => "https://mydomainx.com/confirmation",
    "ValidationURL" => "https://mydomainx.com/validation",
));

curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
Posted by: Guest on February-28-2022

Code answers related to "Javascript"

Browse Popular Code Answers by Language