不懂PHP,花了几天时间研究了,还是有好些地方没明白.特来此请教高手.
PHP代码如下:<?php
function request_by_curl($remote_server, $post_string,$headers)
{
$ch = curl_init();
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_URL, $remote_server);//网址
curl_setopt($ch, CURLOPT_POSTFIELDS, 'mypost=' . $post_string);//数据
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_USERAGENT, "Jimmy's CURL Example beta");
$data = curl_exec($ch);
curl_close($ch);
return $data;
}
?>
参照网址: http://www.oschina.net/code/snippet_127872_6370
注意代码和参照网址的代码不完全一样.
问题是:如何在AU3的环境下,利用microsoft.xmlhttp实现上述代码的POST功能.最好是每一行都有对应.
最后想也在同时学习PHP的朋友们分享个 PHP手册 的网址: http://www.php.net/manual/zh/funcref.php |