$postData = array("login" => "Prijava", "loginEmail" => "****@****.***", "password" => "*****t", "signonForwardAction" => "/press/cm/si.press.viasat.tv?cc=si&lc=si");
$URL = "http://si.press.viasat.tv/press/cm/1.167?cc=si&lc=si";
$connection = curl_init();
curl_setopt($connection, CURLOPT_URL, $URL);
curl_setopt($connection, CURLOPT_POST, 1);
curl_setopt($connection, CURLOPT_POSTFIELDS, $postData);
curl_setopt($connection, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($connection, CURLOPT_REFERER, "http://si.press.viasat.tv");
curl_setopt($connection, CURLOPT_AUTOREFERER, true);
curl_setopt($connection, CURLOPT_HEADER, true);
curl_setopt($connection, CURLOPT_POSTREDIR, 2);
curl_setopt($connection,CURLOPT_COOKIEJAR, "C:\@DEV\TextALG\cookie.txt");
curl_setopt($connection,CURLOPT_COOKIEFILE, "C:\@DEV\TextALG\cookie.txt");
curl_exec($connection);
curl_close($connection);
에 로그인하려면 다음 코드를 사용
문제 (방화범 발견) 후 사이트 URL로 리디렉션 로그인 즉 (응답 : 302). 그리고 그 결과로 나는 다시 로그인 스크린을 얻는다.
이 같은 쿠키를 얻을 :
# Netscape HTTP Cookie File
# http://curl.haxx.se/rfc/cookie_spec.html
# This file was generated by libcurl! Edit at your own risk.
si.press.viasat.tv FALSE /press FALSE 0 JSESSIONID 00FC3DCA4CFD806CDEBE2CAA7E999463
어떤 아이디어가?
302 응답이없는 사이트에서는 정상적으로 작동합니다 .. –
'curl_setopt ($ connection, CURLOPT_HEADER, false);로 시도했습니다. – diEcho