Answers for "curl_ php"

PHP
9

CURL PHP POST

<?php

$post = [
    'username' => 'user1',
    'password' => 'passuser1',
    'gender'   => 1,
];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'http://www.domain.com');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($post));
$response = curl_exec($ch);
var_export($response);
Posted by: Guest on March-26-2021
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

Browse Popular Code Answers by Language