Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to display content from another web site

Status
Not open for further replies.

perryair

IS-IT--Management
Apr 7, 2005
91
0
0
IL
Hello All..
Do you know how to display content from another web site..?
I have the standrad code that display the entire page:

<%
Set objHTTP = Server.CreateObject("Microsoft.XMLHTTP")
objHTTP.Open "GET", " false
objHTTP.Send
Response.Write objHTTP.ResponseText
%>

How can I pull only particular words or\and numbers?

Thanks.
 
It really depends on what sort of details you want and also of the page layout.

....... why do you want to display content of another page. I am sure there is a better way of accessing those info.



You are either the slave of what made men or what men made.
 
I would like to pull the following from the above link:

Last Trade: <%xxx%>
Change: <%xxx%>

Any idea?
 
Many ways,...

You can use the DOM to navigate to the correct node and extract the informaiton.
--
You can use XPath if the HTML is wellformed XML.
--
You can use string parsing to find information by index of a string in the document. Example:
--
Or you could use a Regular Expression.

Or you can do it the most professional, functional and robust way: by consuming a web service that provides stock quotes.

Here's the WSDL for Yahoo finance stock quote web service: here is some other info:
or:
or:
and more:

One thing to consider is that sites may change their HTML code, which could adversely affect your parsing methods.

Hope that helps

A smile is worth a thousand kind words. So smile, it's easy! :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top