发布网友 发布时间:2022-05-14 08:35
共2个回答
热心网友 时间:2022-05-14 10:04
<?php
//client
$ch = curl_init();
curl_setopt_array($ch,
array(
CURLOPT_URL => 'http://localhost/ua.php',
CURLOPT_USERAGENT => "YeRenChai_v1.0",
CURLOPT_RETURNTRANSFER => True,
CURLOPT_FOLLOWLOCATION => True,
)
);
$response = curl_exec($ch);
if(!$response) exit(curl_error($ch));
var_mp($response);
?>