c# - Get html result from web page -
i planning create movil application (for fun) should utilize result web page (http://consultawebvehiculos.carabineros.cl/index.php). there ways create instance of browser in net code , read result , publish using web service.. like:
var ie= new broswer("http://consultawebvehiculos.carabineros.cl/index.php"); var result=ie.findelementbyid("txtidentitycar").writetext(youridentitycar); publictowebserivce(result);
update: using fiddler can see http post somthing that:
post http://consultawebvehiculos.carabineros.cl/index.php http/1.1 host: consultawebvehiculos.carabineros.cl connection: keep-alive content-length: 61 cache-control: max-age=0 accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 origin: http://consultawebvehiculos.carabineros.cl user-agent: mozilla/5.0 (windows nt 6.2; wow64) applewebkit/537.17 (khtml, gecko) chrome/24.0.1312.57 safari/537.17 content-type: application/x-www-form-urlencoded referer: http://consultawebvehiculos.carabineros.cl/index.php accept-encoding: gzip,deflate,sdch accept-language: es-es,es;q=0.8 accept-charset: iso-8859-1,utf-8;q=0.7,*;q=0.3 accion=buscar&txtletras=cl&txtnumeros1=sk&txtnumeros2=12&vin=
may need .net class webclient in order connect php page...no sure.
update: found solution using fiddler know total parameters , i've used code http://www.hanselman.com/blog/httppostsandhttpgetswithwebclientandcandfakingapostback.aspx
if interested in scraping page, suggest using html agility pack.
if want display page, utilize webbrowser control.
c# .net
No comments:
Post a Comment