이 기능이 paypal.com으로 리디렉션되지 않고 대신 같은 페이지에 머물러있는 이유는 무엇입니까? 컬이 서버에서 활성화되고 안전 모드가 해제되고 openbasedir도 꺼집니다.curl이 예상대로 리디렉션되지 않음
function curl_post($url, array $post = NULL, array $options = array())
{
$defaults = array(
CURLOPT_POST => 1,
CURLOPT_HEADER => 0,
CURLOPT_URL => $url,
CURLOPT_FRESH_CONNECT => 1,
CURLOPT_RETURNTRANSFER => 1,
CURLOPT_FORBID_REUSE => 1,
CURLOPT_TIMEOUT => 4,
CURLOPT_POSTFIELDS => http_build_query($post)
);
$ch = curl_init();
curl_setopt_array($ch, ($options + $defaults));
if(! $result = curl_exec($ch))
{
trigger_error(curl_error($ch));
}
curl_close($ch);
return $result;
}
curl_post("https://www.paypal.com/cgi-bin/webscr",$_POST);
내가 뭘 잘못하고 있는지 알겠습니까?
를 지금까지 내가 아는 한, 컬는 HTTP 요청을합니다. 그것은 리다이렉트하지 않으며 어떤 종류의 웹 브라우저로도 작동하지 않습니다. – CP510