get http code curl php
$info = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
if ($info == 200){
return json_decode($result);
}
get http code curl php
$info = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
if ($info == 200){
return json_decode($result);
}
php curl post
// 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);
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);
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us