Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - MSNBC or another site news.....
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

MSNBC or another site news.....

 Post Reply Post Reply Page  12>
Author
skyworld View Drop Down
Senior Member
Senior Member


Joined: 12 December 2002
Location: United States
Status: Offline
Points: 134
Post Options Post Options   Thanks (0) Thanks(0)   Quote skyworld Quote  Post ReplyReply Direct Link To This Post Topic: MSNBC or another site news.....
    Posted: 20 February 2003 at 8:59am
is there a script out or code snippet for getting news from another site to put on yours? It would be cool to have world news on my site with out having to keep updating every 10 minutes...
Back to Top
Mart View Drop Down
Senior Member
Senior Member
Avatar

Joined: 30 November 2002
Status: Offline
Points: 2304
Post Options Post Options   Thanks (0) Thanks(0)   Quote Mart Quote  Post ReplyReply Direct Link To This Post Posted: 20 February 2003 at 10:27am

You could use the xmlhttp componant if you tell me which site I will help you make a script.

Back to Top
faubo View Drop Down
Senior Member
Senior Member
Avatar

Joined: 30 May 2002
Location: Brazil
Status: Offline
Points: 560
Post Options Post Options   Thanks (0) Thanks(0)   Quote faubo Quote  Post ReplyReply Direct Link To This Post Posted: 20 February 2003 at 1:51pm

Search the word RSS in google,

and take a look in this site:

www.newsisfree.com

I will implement a RSS on my news and events based on my asp db as soon as I get some extra time

 

Back to Top
skyworld View Drop Down
Senior Member
Senior Member


Joined: 12 December 2002
Location: United States
Status: Offline
Points: 134
Post Options Post Options   Thanks (0) Thanks(0)   Quote skyworld Quote  Post ReplyReply Direct Link To This Post Posted: 20 February 2003 at 4:27pm
Back to Top
MorningZ View Drop Down
Senior Member
Senior Member
Avatar

Joined: 06 May 2002
Location: United States
Status: Offline
Points: 1793
Post Options Post Options   Thanks (0) Thanks(0)   Quote MorningZ Quote  Post ReplyReply Direct Link To This Post Posted: 20 February 2003 at 4:59pm
man o man....

theres a word to apply here: "babysteps"

you want to have something like this and don't even know about "Request.QueryString" ?

yikes... i hope all this stuff is for fun.....

neverless for that reality check.. the following code will grab what you want

<%@ Language=VBScript %>
<% Response.Expires = -1 %>
<% Response.Buffer = True %>
<%
StartDomain = "http://www.msnbc.com/"
StartPage = "news/default.asp?cp1=1"
StartURL = StartDomain & StartPage

Set xml = Server.CreateObject("MSXML2.ServerXMLHTTP")
xml.Open "GET", StartURL, False
xml.Send
strHTML = xml.ResponseText
Set xml = Nothing
Dim objRegExp, objMatch, objMatches
Set objRegExp = New RegExp

objRegExp.IgnoreCase = True
objRegExp.Global = True
objRegExp.Pattern = "<a href=(.*?)\.asp\?0cv=CB10>(.*?)</a>"
Set objMatches = objRegExp.Execute(strHTML)

Response.Write("<font size=""1"" face=""verdana"">")
For Each objMatch in objMatches
     thisLink = Replace(objMatch, "<a href=", "<a href=" & StartDomain & "news/" )
     Response.Write( thisLink )
Next
Response.Write("</font>")
Set objMatch = Nothing
Set objRegExp = Nothing
%>
Contribute to the working anarchy we fondly call the Internet
Back to Top
skyworld View Drop Down
Senior Member
Senior Member


Joined: 12 December 2002
Location: United States
Status: Offline
Points: 134
Post Options Post Options   Thanks (0) Thanks(0)   Quote skyworld Quote  Post ReplyReply Direct Link To This Post Posted: 20 February 2003 at 5:13pm
 

Server object error 'ASP 0177 : 800401f3'

Server.CreateObject Failed

/index.asp, line 9

Invalid class string

Back to Top
MorningZ View Drop Down
Senior Member
Senior Member
Avatar

Joined: 06 May 2002
Location: United States
Status: Offline
Points: 1793
Post Options Post Options   Thanks (0) Thanks(0)   Quote MorningZ Quote  Post ReplyReply Direct Link To This Post Posted: 20 February 2003 at 5:38pm
you're on your own bucko... the code works 100% (as shown)

perhaps you dont have the latest XML components installed on whatever you use for a web server
Contribute to the working anarchy we fondly call the Internet
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 20 February 2003 at 5:44pm

The error does mean that the compoent is not installed on the web server.

The MSXML component insatll with Internet Explorer 5 and above, get you web host to update there server, or they may have removed the component for security reasons as there are some security issues with the XMLHTTP component.

Back to Top
 Post Reply Post Reply Page  12>

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.