Getting Data from a Web site source?

Hi,

I have been thinking about this for a while, haven’t come up with an answer yet. Maybe someone has done something similar and can point me in the right direction. I would like to pull data from a web page and parse it so that I can use it in Notes. Specifically, what would be nice is to be able to run an agent daily that would grab a page containing currancy rates and store them in a document so that the daily rate could be used for calculations.

Anyone have an idea on how to do this?

thanks

-bryan

Subject: Getting Data from a Web site source??

I’ve done something smiliar before.I used a shell command via script using wget to go grab the file from the net, then just parsed it with script.

Subject: Getting Data from a Web site source??

This is the type of problem that web services et al is designed to solve.

It is relatively easy to do what you ask, but the first time significant changes are made to the web site that you are getting your data from will kill your app.

It may be overkill for your application, but we get exchange rates in XML format from Oanda.com on a subscription basis ($200/month).

http://www.oanda.com/channels/business/FXML.shtml

Also, check out this sandbox database http://www-10.lotus.com/ldd/sandbox.nsf/ByDateNJ/5957820fa8268dbf85256bae00671773?OpenDocument for examples on SOAPConnect for Lotusscript

Subject: Getting Data from a Web site source??

I use some code to send and receive XML data to and from UPS, but there’s no reason why you couldn’t send an HTML post instead using similar means. Here’s a skeleton of the code I use…

Dim objHttp As Variant

Set objHttp = CreateObject(“Microsoft.XMLHTTP”)

’ — open a new POST request and set the Content-type header

url = |Https://www.ups.com/ups.app/xml/Rate|

req = |<?xml version="1.0"?>

<TransactionReference>

      <CustomerContext>Rating and Service</CustomerContext>

      <XpciVersion>1.0001</XpciVersion>

</TransactionReference>

<RequestAction>Rate</RequestAction>

<RequestOption>rate</RequestOption>

|

objHttp.open “POST”, url, False, “”, “”

objHttp.setRequestHeader “Content-type”, “application/x-www-form-urlencoded”

objHttp.send(req)

response = objHttp.responseText ’ returns the text of the page

Subject: RE: Getting Data from a Web site source??

Could you please post some more of your code? I am really struggling to figure out how to use Domino to access the UPS shipping rate and it would really help if I could look at some existing code.

Any help of info would be most greatly appreciated.

Shawn