我的代码是:
<?php
extract($_POST);
$url = "http://www.domain.com/";
$fields = array(
'myparam1' => 'something',
);
foreach($fields as $key=>$value) { $fields_string .= $key.'='.$value.'&'; }
rtrim($fields_string, '&');
//open connection
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL, $url);
curl_setopt($ch,CURLOPT_POST, count($fields));
curl_setopt($ch,CURLOPT_POSTFIELDS, $fields_string);
//curl_setopt($ch,CURLOPT_RETURNTRANSFER, false);
$result = curl_exec($ch);
print_r("+");
curl_close($ch);
?>
问题是它在网络浏览中显示响应,但我不想。任何帮助,将不胜感激。