Iniciando em curl
Ola galera to iniciando em curl to aprendendo se alguem poder me ajuda agradeço
seguinte to fazendo sistema simples ele entra no sistema azul ve quando tem de saldo e calcula se tem bastante ponto pra comprar passagem
$header[] = "Accept:text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8";
$header[] = "Cache-Control: max-age=0";
$header[] = "Connection: keep-alive";
$header[] = "Keep-Alive:timeout=5, max=100";
$header[] = "Accept-Charset:ISO-8859-1,utf-8;q=0.7,*;q=0.3";
$header[] = "'Content-Type: application/json; charset=utf-8";
$header[] = "Accept-Language:es-ES,es;q=0.8";
$header[] = "Pragma: ";
$setCURL = curl_init();
curl_setopt($setCURL, CURLOPT_URL, "https://viajemais.voeazul.com.br");
curl_setopt($setCURL, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 5.1; rv:31.0) Gecko/20100101 Firefox/31.0");
curl_setopt($setCURL, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($setCURL, CURLOPT_RETURNTRANSFER, 1);
//curl_setopt($setCURL, CURLOPT_HTTPHEADER, array('Content-Type: application/json; charset=utf-8'));
curl_setopt($setCURL, CURLOPT_HTTPHEADER, $header);
curl_setopt($setCURL, CURLOPT_VERIFYPEER, 0);
curl_setopt($setCURL, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($setCURL, CURLOPT_ENCODING, "");
curl_setopt($setCURL, CURLOPT_COOKIEFILE, "cookie.txt");
curl_setopt($setCURL, CURLOPT_COOKIEJAR, "cookie.txt");
//curl_setopt($setCURL, CURLOPT_POST, 1);
curl_setopt($setCURL, CURLOPT_GET, true);
curl_setopt($setCURL, CURLOPT_POSTFIELDS, 'AzulLoginMemberAjax.aspx?username='.$cpf.'&password='.$senha.'&_=1445271292983');
$curlExec = curl_exec($setCURL);
curl_close($setCURL);
print $curlExec;
pelo que eu aprendi tava certo porem nao loga alguem sabe me dizer na onde estou errado ????
Discussão (3)
Carregando comentários...