开发者

How to get data from another page (different servers)

I want to make a IE8 web slice who will show remaining amount of students "food credit". In our country we have web page where we can see amount www.cap.srce.hr/ProvjeraSaldo.aspx. When I fill textbox with my card number I receive remaining amount. Now, I want to speed that process with IE8 web slice. So is it possible to get data from another webserver page and than display it in my web slice on my web server. I tried to use XMLHTTP request but it can be only used on same domains. Url for getting amount is :

http://www.cap.srce.hr/saldo.aspx?brk开发者_JAVA百科={number_of_card}


Several ways, depending on your situation:

  1. As an IFRAME (if you get the other server to render HTML instead of Javascript)
  2. As JSONP
  3. Through a server-side proxy
  4. Through a Flash bridge (which would require a crossdomain.xml on the other server)


Tnx Malvolio. I found other solution using ASP.NET. More info on this page : http://www.csharp-station.com/HowTo/HttpWebFetch.aspx . After you fetch web page source you can try parse elements using Regex or I found more easy way using great library HtmlAgilityPack (http://htmlagilitypack.codeplex.com/)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜