try to get cURL extension, http://us2.php.net/curlhttp://curl.planetmirror.com/also see
http://www.tek-tips.com/faqs.cfm?fid=2502http://www.alt-php-faq.org/local/55/
http://www.tek-tips.com/faqs.cfm?fid=2502http://www.alt-php-faq.org/local/55/
set_time_limit(100);$data['vendor_id'] = '12345';
$data['vendor_pwd'] = 'qingxia';$url = "http://localhost/post.php";
$url = parse_url($url);if (!$url) return "couldn't parse url";
if (!isset($url['port'])) { $url['port'] = 80; }
if (!isset($url['query'])) { $url['query'] = ""; }$fp = fsockopen($url['host'], 80);if (!$fp)
{
echo "Failed to open socket to $url[host]";
fclose($fp);
exit;
}$content = "vendor_id=".$data['vendor_id']."&vendor_pwd=".$data['vendor_pwd']."&Submit=%CC%E1%BD%BB";$request = "POST ".$url['path']." HTTP/1.1\r\n";
$request .= "Host: ".$url['host']."\r\n";
$request .= "Content-Type: application/x-www-form-urlencoded\r\n";
$request .= "User-Agent: roastduck Http/1.1\r\n";
$request .= "Accept-Language: zh-cn\r\n";
$request .= "Content-length: ".strlen($content)."\r\n";
$request .= "Connection: Keep-Alive\r\n\r\n";
$request .= $content;fputs($fp, $request);while (!feof ($fp))
{
$tmp .= fgets($fp, 4096);
}
fclose($fp);echo $tmp;?>
这个表单你能控制吗?
abc.php 难道就是个中转吗?那什么不从abc.htm直接提交到 那个http上去呢?
例子:
fopen ("http://www.example.com/sample.php?id=$id&$UserName=$UserName&Password=$Password", "r");
这样在sample.php里面处理这些参数变量即可
记得最后关掉句柄
使用HTTPS楼上几个看清楚阿起码端口是445另外协议肯定和HTTP有不同的地方,不然怎么体现"S"呢?呵呵
hackfan熟悉吗?