//Logowanie
function Login() {
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, "https://logowanie.playmobile.pl/p4webportal/SsoRequest");
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($curl, CURLOPT_FOLLOWLOCATION,1);
curl_setopt($curl, CURLOPT_HEADER , 1);
curl_setopt($curl, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; pl; rv:1.8.1.12) Gecko/20080201 Firefox/2.0.0.12;MEGAUPLOAD 1.0');
curl_setopt($curl, CURLOPT_COOKIEFILE, 'cookie.txt');
curl_setopt($curl, CURLOPT_COOKIEJAR, 'cookie.txt');
$strona = curl_exec($curl);
curl_close($curl);
echo $matches[1][0]."<br>"; echo $matches[1][1]."<br>"; $curl = curl_init();
curl_setopt($curl, CURLOPT_URL, "https://logowanie.playmobile.pl/p4-idp2/SSOrequest.do");
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 0);
curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($curl, CURLOPT_FOLLOWLOCATION,0);
curl_setopt($curl, CURLOPT_HEADER , 1);
curl_setopt($curl, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; pl; rv:1.8.1.12) Gecko/20080201 Firefox/2.0.0.12;MEGAUPLOAD 1.0');
curl_setopt($curl, CURLOPT_COOKIEFILE, 'cookie.txt');
curl_setopt($curl, CURLOPT_COOKIEJAR, 'cookie.txt');
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_REFERER, "https://logowanie.playmobile.pl/p4webportal/SsoRequest");
curl_setopt($curl, CURLOPT_POSTFIELDS,'SAMLRequest='.$matches[1][0].'&target='.$matches[1][1]);
$strona = curl_exec($curl);
//return curl_error($curl);
}
Wychodzi błąd "Play Could not parse the SSO request". Ktoś wie w czym może być problem?