NetTalk Central

Author Topic: How to use NetTalk to fill web page and get the data  (Read 10149 times)

terryho

  • Newbie
  • *
  • Posts: 20
    • View Profile
    • Email
How to use NetTalk to fill web page and get the data
« on: January 20, 2010, 02:58:13 AM »
Hi ,

    Can anyone to point me the way and give me some hints!

    I want to use NetTalk, to fill in some information in a web page and then click the continue button of the web page, after the click on this button, the web page will come out with some data, then I can capture this data and use it. I know how to capture a web page, but I don't know how to fill in some infomation in a web page (which there is some box in the web page and allow to fill in, just like the email login name and password). After that, I need to push the button in the web page, which mean submit the data. After that, it will refesh the page with some data.

     Regards

Terry Ho

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11183
    • View Profile
Re: How to use NetTalk to fill web page and get the data
« Reply #1 on: January 20, 2010, 07:05:59 AM »
Here's the short answer:

"Pressing a button" in a browser does a POST in HTTP. So using NetTalk, using the WebClient class, you'd use the POST method to do a POST.

The POST returns a "PageReceived" same as a FETCH does.

The key to everything is naturally the formatting of the POST Data String which goes with the Post. There obviously a lot of data online on that, and you can see post data from the server's point of view  if you play with the web server a bit.

I'm hoping to do a webinar on this topic though in February some time to cover it in a lot more detail.

Cheers
Bruce

Alberto

  • Hero Member
  • *****
  • Posts: 1846
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: How to use NetTalk to fill web page and get the data
« Reply #2 on: January 22, 2010, 07:23:28 AM »
Bruce,
I need to open the following page
http://www.level2stockquotes.com/level-ii-quotes.html
Insert a value in the "second" entry field "Enter symbol", press the GO button and read the result page.
How can I do it?
Thanks
Alberto
-----------
Regards
Alberto

Alberto

  • Hero Member
  • *****
  • Posts: 1846
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: How to use NetTalk to fill web page and get the data
« Reply #3 on: January 25, 2010, 05:13:17 AM »
Bruce,
I manage to use Fiddler with this page.
I can get data only in the Raw widow, that is:

GET /arcadataserver/ArcaBookData.php?Symbol=C HTTP/1.1
Host: 65.171.227.144
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; es-AR; rv:1.9.1.7) Gecko/20091221 Firefox/3.5.7 (.NET CLR 3.5.30729)
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: es-ar,es;q=0.8,en-us;q=0.5,en;q=0.3
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Referer: http://www.level2stockquotes.com/rby-l2-html-bookviewer-1a.html

That is what I need to post to the page?
THanks
Alberto
-----------
Regards
Alberto

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11183
    • View Profile
Re: How to use NetTalk to fill web page and get the data
« Reply #4 on: January 25, 2010, 10:50:51 PM »
use Fiddler to trap the packet that occurs when you click the GO button.

cheers
Bruce