| Author |
Topic Search Topic Options
|
skyworld
Senior Member
Joined: 12 December 2002
Location: United States
Status: Offline
Points: 134
|
Post Options
Thanks(0)
Quote Reply
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...
|
 |
Mart
Senior Member
Joined: 30 November 2002
Status: Offline
Points: 2304
|
Post Options
Thanks(0)
Quote Reply
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.
|
 |
faubo
Senior Member
Joined: 30 May 2002
Location: Brazil
Status: Offline
Points: 560
|
Post Options
Thanks(0)
Quote Reply
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
|
|
|
 |
skyworld
Senior Member
Joined: 12 December 2002
Location: United States
Status: Offline
Points: 134
|
Post Options
Thanks(0)
Quote Reply
Posted: 20 February 2003 at 4:27pm |
|
|
 |
MorningZ
Senior Member
Joined: 06 May 2002
Location: United States
Status: Offline
Points: 1793
|
Post Options
Thanks(0)
Quote Reply
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
|
 |
skyworld
Senior Member
Joined: 12 December 2002
Location: United States
Status: Offline
Points: 134
|
Post Options
Thanks(0)
Quote Reply
Posted: 20 February 2003 at 5:13pm |
Server object error 'ASP 0177 : 800401f3'
Server.CreateObject Failed
/index.asp, line 9
Invalid class string
|
 |
MorningZ
Senior Member
Joined: 06 May 2002
Location: United States
Status: Offline
Points: 1793
|
Post Options
Thanks(0)
Quote Reply
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
|
 |
WebWiz-Bruce
Admin Group
Web Wiz Developer
Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
|
Post Options
Thanks(0)
Quote Reply
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.
|
|
|
 |