Join us in Outworldz at www.outworldz.com:9000 or follow us:

Search dozens of selected web sites for OpenSim and LSL script

New! Script Meta-Search will search thousands of scripts here and at other sites for LSL or Opensim scripts.
Loading

Want to add a script or a project? Upload it and a half million people will see it and your name here this year.

Home   Show All
Category: Contributor: Creator
RSS Cnnrssfeed  

Cnnrssfeed

Cnn-rss-feed.lsl

Category: RSS
By : Wietse Cassini
Created: 2010-01-10 Edited: 2010-01-10
Worlds: Second Life

the Zip file

Download all files for Cnnrssfeed
Contents are in zip format, with .LSL (text) source code and LSLEdit (text + Solution) formats.
Get file # 1. Cnnrssfeed_1.lsl
1
2
3 string LatestItem;
4 string RSSurl = "http://rss.cnn.com/rss/cnn_topstories.rss";
5 key PageKey;
6
7 default
8 {
9 state_entry ()
10 {
11 llSay(0, "Scripts 'r us CNN RSS feed started. Brought to you by Wietse Cassini");
12 llSay(0, "Top stories RSS feed");
14
15 }
16
17 timer ()
18 {
19 PageKey = llHTTPRequest(RSSurl,[],"");
20 }
21
22 http_response (key request_id, integer status, list metadata, string body)
23 {
24 integer begin = llSubStringIndex(body, "<item>") + 6;
25 integer end = llSubStringIndex(body, "</item>");
26 string item = llGetSubString(body, begin, end);
27
28 if(item != LatestItem)
29 {
30
31 LatestItem = item;
32
33 begin = llSubStringIndex(item, "<title>") + 7;
34 end = llSubStringIndex(item, "</title>");
35 llSay(0, llGetSubString(item, begin, end));
36
37 begin = llSubStringIndex(item, "<description>") + 13;
38 end = llSubStringIndex(item, "</description>");
39 llSay(0, llGetSubString(item, begin, end));
40
41 begin = llSubStringIndex(item, "<link>") + 6;
42 end = llSubStringIndex(item, "</link>");
43 llSay(0, llGetSubString(item, begin, end));
44 }
45 }
46 } // end

Back to the Best Free Tools in Second Life and OpenSim.