이 사이트의 Curl을 사용하여 자동으로 로그인하려고 시도하고 있습니다 : https://online.hinode.com.br이며 컨설턴트 ID는 자동으로 항상 같은 상태로 채워 져야합니다. 로그인 후 특정 제품 페이지로 리디렉션되어야합니다. 그러나 테스트 한 코드는 아무데도 가지 않았습니다! 오류 없음, html이로드되지 않습니다.이 선택 필드 여야한다고 생각합니다. 잘 모르겠습니다.입력란 중 하나 인 Curl을 통한 자동 로그인
코드 :
<?php
// Start cURL
$ch = curl_init();
// Define the original URL (of the login form)
curl_setopt($ch, CURLOPT_URL, 'https://online.hinode.com.br/');
// Enable POST protocol
curl_setopt ($ch, CURLOPT_POST, 1);
// Define the parameters that will be sent (user and password for example)
curl_setopt ($ch, CURLOPT_POSTFIELDS, 'loja_consultor=fulano&estado=SP');
// Imitate the boss behavior of browsers: handle cookies
curl_setopt ($ch, CURLOPT_COOKIEJAR, 'cookie.txt');
// Set the transfer type (Padrão: 1)
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
// Execute the requisition
$store = curl_exec ($ch);
// Define a new URL to be called (after login)
curl_setopt($ch, CURLOPT_URL, 'https://online.hinode.com.br/detalhes.asp?IdProduto=769&ssp=830852727SSP20171218HP115020');
// Execute the second request
$content = curl_exec ($ch);
// 닫기 컬 curl_close ($ ch를);
미리 감사드립니다. enter image description here
Downvoting 영어로없는 때문. – pepperjack
메인 스택 오버 플로우 사이트에 관한 질문은 영어로해야합니다. [pt.so]를 시도하십시오. – jmoerdyk
미안 해요, 스택에 여기 도움을 찾고 있어요. –