curl post数据无法正确提交

时间:2012-12-05 23:45:36

标签: php curl

我正在尝试使用POST为用户名,密码字段传递数据变量,但它不发送我相信。它只返回“无效的用户名/密码”有关如何解决的任何想法?

使用POSTFIELDS

$post = array();

        $this->setCurlOption(CURLOPT_POST, true);

        foreach($_POST as $key=>$value)
        {
            $post[] = urlencode($key)."=".urlencode($value);
        }

        $this->setCurlOption(CURLOPT_POSTFIELDS, implode('&',$post));

        unset($post);

另外,如果我卷入一个有图像的网站,它似乎不会显示图像。 image of no images being displayed

0 个答案:

没有答案