, but it doesn"t seem right to show a thousand dollars at a time. How to achieve a 20-year-old through php? Is there anything you can refer to? Blah, blah, blah!
not at all
function httpRequest ($api, $data_string)
{
$ch = curl_init($api);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-Type: application/json"));
curl_setopt($ch, CURLOPT_TIMEOUT, 5);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5);
$result = curl_exec($ch);
curl_close($ch);
return json_decode($result);
}
$x = array(
"session" => $_SESSION["session"]
);
$x_string = json_encode($x);
$x = httpRequest($api, $x_string);
this is how I get the data of the opposite party, but how. Do the sharing?