cURL does not return HTML

0

I'm creating a custom management panel, but I'm having a hard time, because the HTML of my request after login does not appear on the screen, instead the login . How can I make the login and give the page display /account after the login ?

<?php

$email = '    ';

$senha = '   ';

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, 'http://minhaconta.payleven.com.br/login_check');

curl_setopt($ch, CURLOPT_COOKIESESSION, true);

curl_setopt($ch, CURLOPT_COOKIEJAR, 'cookie.txt');

curl_setopt($ch, CURLOPT_COOKIEFILE, 'cookie.txt');

curl_setopt ($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6");

curl_setopt ($ch, CURLOPT_POST, 1);

curl_setopt ($ch, CURLOPT_POSTFIELDS, '_username=' . urlencode($email) . '&_password=' . urlencode($senha)); 

curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);

curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);

curl_setopt($ch, CURLOPT_URL, 'http://minhaconta.payleven.com.br/account');

$track = curl_exec ($ch);

curl_close ($ch);

echo $track;

?>

Answer:

HTTP/1.1 301 Moved Permanently Content-Type: text/html Date: Sun, 09 Jul 2017 18:15:09 GMT Location: https://minhaconta.payleven.com.br/account Server: nginx Content-Length: 178 Connection: keep-alive HTTP/1.1 302 Found Cache-Control: no-cache Content-Type: text/html; charset=UTF-8 Date: Sun, 09 Jul 2017 18:15:07 GMT Location: https://minhaconta.payleven.com.br/login Server: nginx Set-Cookie: village=218gi74f0dgc7osgtmts2jbns4; path=/ Content-Length: 5183 Connection: keep-alive HTTP/1.1 200 OK Cache-Control: no-cache Content-Type: text/html; charset=UTF-8 Date: Sun, 09 Jul 2017 18:15:09 GMT Server: nginx Vary: Accept-Encoding Content-Length: 11320 Connection: keep-alive
    
asked by anonymous 09.07.2017 / 19:33

0 answers