Sponsored Content
Special Forums News, Links, Events and Announcements HOWTO: RSS Feeds for UNIX Forums Post 60420 by Neo on Monday 17th of January 2005 12:45:18 AM
Old 01-17-2005
Please note I have added this code to the footer that provides the link to our RSS feed based on forum id:

HTML Code:
<a href="https://www.unix.com/external.php?forumids=$forumid"><img src="images/xml.jpg" alt="[RSS]" title="UNIX Forums RSS Feed" align="right"/></a>
External links can't use the code above because the variable $forumid is not set.

For the general forum, try:

HTML Code:
<br /><a href="https://www.unix.com/external.php"><img src="images/xml.jpg" alt="[RSS]" title="UNIX Forums RSS Feed" align="right"/></a>
With the image in this attachment.
 

6 More Discussions You Might Find Interesting

1. Post Here to Contact Site Administrators and Moderators

RSS Feeds of Threads

Hi Guys, With the RSS feeds of new threads added to the forums, would it be possible to include the text of the post in the RSS body? This means that i wouldn't have to keep clicking "view site" to see what the thread's about from my rss aggregator. I've included 2 x screenshots below that... (11 Replies)
Discussion started by: craigp84
11 Replies

2. What is on Your Mind?

Post Your Favorite UNIX/Linux Related RSS Feed Links

Hello, I am planning to revise the RSS News subforum areas, here: News, Links, Events and Announcements - The UNIX Forums ... maybe with a subforum for each OS specific news, like HP-UX, Solaris, RedHat, OSX, etc. RSS subforums.... Please post your favorite OS specific RSS (RSS2) link... (0 Replies)
Discussion started by: Neo
0 Replies

3. Shell Programming and Scripting

RSS feeds to Email

Hi all ;-) I would like to know if somebody knows a way to make a script for check a .xml RSS page every 1-5 min and send the last news to an email address. I would like to put in on my shell with FreeBSD 6.2 Thanks you in advance 4 help! ;-) (0 Replies)
Discussion started by: Mukka
0 Replies

4. Shell Programming and Scripting

useless line feeds in ldapsearch output. Howto remove with shell script?

Hi $ cat ad.sh ldapsearorg -x -LLL -h sb1131z.testbadbigcorp.org -D "CN=ADMINZZ,OU=AdminRoles,DC=testbadbigcorp,DC=org" -w "UT3w4f57lll--4...4" -b "OU=Test,DC=testbadbigcorp,DC=org" "(&(&(&(&(objectCategory=person)(objectClass=user)(lockoutTime:1.2.840.113556.1.4.804:=4294967295)))))" dn$... (3 Replies)
Discussion started by: slashdotweenie
3 Replies

5. Post Here to Contact Site Administrators and Moderators

VIP Membership - The UNIX and Linux Forums - Get Your UNIX.COM Email Address Here

We work hard to make The UNIX and Linux Forums one of the best UNIX and Linux knowledge sources on the net. The site is certainly one of the top UNIX and Linux Q&A sites on the web. In order to provide certain members the best quality account services, you can now get some great extra features by... (2 Replies)
Discussion started by: Neo
2 Replies

6. What is on Your Mind?

YouTube: Forum Moderation @UNIX.com | The UNIX and Linux Forums

Forum Moderation @UNIX.com | The UNIX and Linux Forums https://youtu.be/WGwgibE4Rq0 Also note: In the video I mentioned removing legacy menu items in the ModCP which are unused. I have already "CSS'ed out" the unused menu items: ... (0 Replies)
Discussion started by: Neo
0 Replies
HTML::LinkExtor(3)					User Contributed Perl Documentation					HTML::LinkExtor(3)

NAME
HTML::LinkExtor - Extract links from an HTML document SYNOPSIS
require HTML::LinkExtor; $p = HTML::LinkExtor->new(&cb, "http://www.perl.org/"); sub cb { my($tag, %links) = @_; print "$tag @{[%links]} "; } $p->parse_file("index.html"); DESCRIPTION
HTML::LinkExtor is an HTML parser that extracts links from an HTML document. The HTML::LinkExtor is a subclass of HTML::Parser. This means that the document should be given to the parser by calling the $p->parse() or $p->parse_file() methods. $p = HTML::LinkExtor->new([$callback[, $base]]) The constructor takes two optional arguments. The first is a reference to a callback routine. It will be called as links are found. If a callback is not provided, then links are just accumulated internally and can be retrieved by calling the $p->links() method. The $base argument is an optional base URL used to absolutize all URLs found. You need to have the URI module installed if you provide $base. The callback is called with the lowercase tag name as first argument, and then all link attributes as separate key/value pairs. All non-link attributes are removed. $p->links Returns a list of all links found in the document. The returned values will be anonymous arrays with the follwing elements: [$tag, $attr => $url1, $attr2 => $url2,...] The $p->links method will also truncate the internal link list. This means that if the method is called twice without any parsing between them the second call will return an empty list. Also note that $p->links will always be empty if a callback routine was provided when the HTML::LinkExtor was created. EXAMPLE
This is an example showing how you can extract links from a document received using LWP: use LWP::UserAgent; use HTML::LinkExtor; use URI::URL; $url = "http://www.perl.org/"; # for instance $ua = LWP::UserAgent->new; # Set up a callback that collect image links my @imgs = (); sub callback { my($tag, %attr) = @_; return if $tag ne 'img'; # we only look closer at <img ...> push(@imgs, values %attr); } # Make the parser. Unfortunately, we don't know the base yet # (it might be diffent from $url) $p = HTML::LinkExtor->new(&callback); # Request document and parse it as it arrives $res = $ua->request(HTTP::Request->new(GET => $url), sub {$p->parse($_[0])}); # Expand all image URLs to absolute ones my $base = $res->base; @imgs = map { $_ = url($_, $base)->abs; } @imgs; # Print them out print join(" ", @imgs), " "; SEE ALSO
HTML::Parser, HTML::Tagset, LWP, URI::URL COPYRIGHT
Copyright 1996-2001 Gisle Aas. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.8.0 2001-04-10 HTML::LinkExtor(3)
All times are GMT -4. The time now is 07:35 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy