Delphi idhttp ASP
28/09/2016
0
Boa noite pessoal
Estou precisando acessar um site via Delphi, digitar CNPJ, CAPTCHA e conseguir retornar os dados em um memo.
Segue parte do html
<form name="aspnetForm" method="post" action="./consultacontribuinte.aspx" onsubmit="javascript:return WebForm_OnSubmit();" id="aspnetForm">
<div>
<input type="hidden" name="__LASTFOCUS" id="__LASTFOCUS" value="" />
<input type="hidden" name="__EVENTTARGET" id="__EVENTTARGET" value="" />
<input type="hidden" name="__EVENTARGUMENT" id="__EVENTARGUMENT" value="" />
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUKLTQ3MzE0MjEyMA9kFgJmD2QWAgIBD2QWAgIDD2QWCAIDDxYCHgdWaXNpYmxlZ2QCEg9kFgICAw9kFgICAw9kFgYCAQ9kFgICAw9kFgQCJQ88KwARAgEQFgAWABYADBQrAABkAjcPPCsAEQEMFCsAAGQCAg9kFgICBQ88KwARAgEQFgAWABYADBQrAABkAgMPZBYCAgMPZBYCAhMPPCsAEQIBEBYAFgAWAAwUKwAAZAIUDxYCHgV2YWx1ZWRkAhUPFgIfAWRkGAYFLGN0bDAwJGZyYW1lQ29ycG8kVmlld0NuYWVTZWNndkNuYWVTZWN1bmRhcmlvD2dkBR5fX0NvbnRyb2xzUmVxdWlyZVBvc3RCYWNrS2V5X18WBwUVY3RsMDAkZnJhbWVDb3JwbyRyYklFBRZjdGwwMCRmcmFtZUNvcnBvJHJiQ1BGBRZjdGwwMCRmcmFtZUNvcnBvJHJiQ1BGBRdjdGwwMCRmcmFtZUNvcnBvJHJiQ05QSgUXY3RsMDAkZnJhbWVDb3JwbyRyYkNOUEoFGGN0bDAwJGZyYW1lQ29ycG8kcmJSYXphbwUYY3RsMDAkZnJhbWVDb3JwbyRyYlJhemFvBSFjdGwwMCRmcmFtZUNvcnBvJGd2Q3JlZGVuY2lhbWVudG8PZ2QFHGN0bDAwJGZyYW1lQ29ycG8kZ2R2Q29uc3VsdGEPZ2QFGWN0bDAwJGZyYW1lQ29ycG8kbXZ3SXRlbnMPD2RmZAUhY3RsMDAkZnJhbWVDb3JwbyRndkNuYWVTZWN1bmRhcmlvD2dkehg83eNbMT9/7RpjU4AgHsoEL1w=" />
</div>
Gostaria de ajuda em montar o a requisição.
Estou precisando acessar um site via Delphi, digitar CNPJ, CAPTCHA e conseguir retornar os dados em um memo.
Segue parte do html
<form name="aspnetForm" method="post" action="./consultacontribuinte.aspx" onsubmit="javascript:return WebForm_OnSubmit();" id="aspnetForm">
<div>
<input type="hidden" name="__LASTFOCUS" id="__LASTFOCUS" value="" />
<input type="hidden" name="__EVENTTARGET" id="__EVENTTARGET" value="" />
<input type="hidden" name="__EVENTARGUMENT" id="__EVENTARGUMENT" value="" />
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUKLTQ3MzE0MjEyMA9kFgJmD2QWAgIBD2QWAgIDD2QWCAIDDxYCHgdWaXNpYmxlZ2QCEg9kFgICAw9kFgICAw9kFgYCAQ9kFgICAw9kFgQCJQ88KwARAgEQFgAWABYADBQrAABkAjcPPCsAEQEMFCsAAGQCAg9kFgICBQ88KwARAgEQFgAWABYADBQrAABkAgMPZBYCAgMPZBYCAhMPPCsAEQIBEBYAFgAWAAwUKwAAZAIUDxYCHgV2YWx1ZWRkAhUPFgIfAWRkGAYFLGN0bDAwJGZyYW1lQ29ycG8kVmlld0NuYWVTZWNndkNuYWVTZWN1bmRhcmlvD2dkBR5fX0NvbnRyb2xzUmVxdWlyZVBvc3RCYWNrS2V5X18WBwUVY3RsMDAkZnJhbWVDb3JwbyRyYklFBRZjdGwwMCRmcmFtZUNvcnBvJHJiQ1BGBRZjdGwwMCRmcmFtZUNvcnBvJHJiQ1BGBRdjdGwwMCRmcmFtZUNvcnBvJHJiQ05QSgUXY3RsMDAkZnJhbWVDb3JwbyRyYkNOUEoFGGN0bDAwJGZyYW1lQ29ycG8kcmJSYXphbwUYY3RsMDAkZnJhbWVDb3JwbyRyYlJhemFvBSFjdGwwMCRmcmFtZUNvcnBvJGd2Q3JlZGVuY2lhbWVudG8PZ2QFHGN0bDAwJGZyYW1lQ29ycG8kZ2R2Q29uc3VsdGEPZ2QFGWN0bDAwJGZyYW1lQ29ycG8kbXZ3SXRlbnMPD2RmZAUhY3RsMDAkZnJhbWVDb3JwbyRndkNuYWVTZWN1bmRhcmlvD2dkehg83eNbMT9/7RpjU4AgHsoEL1w=" />
</div>
Gostaria de ajuda em montar o a requisição.
Host Solucões
Curtir tópico
+ 0
Responder
Clique aqui para fazer login e interagir na Comunidade :)