Jump to content
Welcome, Guest
Existing user? Sign In

Sign In



Sign Up
The MatriX
  • Welcome To Ghbsys
  • CS GO Streaming Version is released. Have fun streaming while cheating!
  • Have a Payment Issue? Send us a Support ticket.
  • Make a thread if you need support or join our discord for live support.
  • Have Suggestions? Make a thread and you'll earn Ghbsys Points for implemented suggestions.
  • Join our discord to stay well connected! Don't forget to integrate your discord to the site
  • Welcome to [GHB] - GAmEhAcKbAsTaRdS Forum

    Welcome to [GHB] - GAmEhAcKbAsTaRdS Forum, like most online communities you must register to view or post in our community, but don't worry this is a simple free process that requires minimal information for you to signup. Be apart of [GHB] - GAmEhAcKbAsTaRdS Forum by signing in or creating an account.
    • Start new topics and reply to others
    • Subscribe to topics and forums to get email updates
    • Get your own profile page and make new friends
    • Send personal messages to other members.

    RSS Feed


    meijör
     Share

    Recommended Posts

    Hey Dudes,

     

    I want my MIRC to get an RSS Feed and output them.

    The exact way i want to use it is that i want to let the script read the rss feed of my last.fm account and post what i hear.

     

    i found a little snippet but dunno how to use it.

     

    menu menubar {

    RSS News Feed

    .BBC News UK

    ..$submenu($RSSparsemenu($1, BBC))

    .CNN

    ..$submenu($RSSparsemenu($1, CNN))

    .International Herald Tribune

    ..$submenu($RSSparsemenu($1, IHT))

    .-

    .Retrieve headlines: retrieveHeadlines

    }

     

    alias -l retrieveHeadlines {

    getRSSfeed BBC newsrss.bbc.co.uk/rss/newsonline_world_edition/front_page/rss.xml

    getRSSfeed IHT www.iht.com/rss/frontpage.xml

    getRSSfeed CNN rss.cnn.com/rss/cnn_topstories.rss

    }

     

    on *:connect:{ retrieveHeadlines }

    alias RSSparsemenu {

    if (e isin $1) return

    if ($1 < 2) return :

    var %str = $hget(RSS_ $+ $2, $1), $&

    %title = $wildtok(%str, title:*, 1, 1), $&

    %link = $wildtok(%str, link:*, 1, 1)

    %title = $gettok(%title, 2-, 58)

    %link = $gettok(%link, 2-, 58)

    return $replace(%title, :, -) :url -n %link

    }

    ; /getRSSfeed <source> <url>

    alias getRSSfeed {

    var %a, %b

    %a = $gettok($2, 1, 47)

    %b = $gettok($2, 2-, 47)

    sockopen %a %a 80

    sockmark %a RSS_ $+ $1 %b

    echo Connecting to %a

    if ($hget(RSS_ $+ $1)) hfree RSS_ $+ $1

    }

    on *:sockopen:*:{

    tokenize 32 $sock($sockname).mark

    if (RSS_* !iswm $1) { return }

    if ($sockerr) {

    echo Closed socket $sockname $sock($sockname).wsmsg

    return

    }

    echo Attempting to retrieve $2-

    sockwrite -n $sockname GET / $+ $2- HTTP/1.0 $+ $crlf $+ $crlf

    unset %rsspop

    }

    on *:sockread:*:{

    tokenize 32 $sock($sockname).mark

    if (RSS_* !iswm $1) { return }

    if ($sockerr > 0) return

    :nextread

    sockread %RSSread

    if ($sockbr == 0) return

    if (%RSSread == $null) %RSSread = -

    var %r = .*\<(title|link)\>(.*)\<\/(title|link)\>.*

    if ($regex(%RSSread, %r)) {

    set %rsspop $addtok(%rsspop, $regml(1) $+ : $+ $regml(2), 1)

    if ($numtok(%rsspop, 1) == 2) {

    hadd -m $1 $calc($hget($1, 0).item + 1) %rsspop

    unset %rsspop

    }

    }

    goto nextread

    }

    on *:sockclose:*:{

    if ($sockerr) echo Closed socket $sockname ( $+ $sock($sockname).wsmsg $+ )

    else echo Closed socket $sockname

    }

     

    Thanks, Major.

    Link to comment
    Share on other sites

    • 5 months later...

    Try downloading Safari

    It has an RSS Feed ' button ' at the top which will show the RSS Feed of a site

    Try it on last.fm O.o

    Link to comment
    Share on other sites

    Guest
    This topic is now closed to further replies.
     Share

    • Recently Browsing   0 members

      • No registered users viewing this page.
    ×
    ×
    • Create New...