具体要求:
传入test2
传入test2type:
hh_version:
country:
quantity:
period:
$type
$hh_version
$country
$quantity
$period
赋值到test2.php
$data = array
=>这里
test2.php
$url = ’https://www.xxxxx.com/api/new-order/?api_key=u3pvcproy0i8s2zhw68xeabvuiu3h4lstrkxxxxx’;
$data = array(
’type’ => ’dedicated’,
’hh_version’ => ’4’,
’country’ => ’ne’,
’quantity’ => ’3’,
’period’ => ’5’
);
$options = array(
’http’ => array(
’header’ => "Content-type: application/x-www-form-urlencodedrn",
’method’ => ’POST’,
’content’ => http_build_query($data)
)
);
$context = stream_context_create($options);
$result = file_get_contents($url, false, $context);
echo($result);
联系我时,请说是在 互站网 看到的,谢谢!