This is *great* for personal webpages, where instead of making a link list and having to constantly update it, this snippet will show visitors your favorites in real time.
You can, of course, change the windir to, for example, c:\\sitelinx , and put the links you want to be seen in the site there.
Update: I did change to Opera as OeufMayo suggested, and edited the code to reflect my Opera5 favorites:
simply add either &IEfav; or &operafav; respectively.
use CGI qw(:all); use strict; sub IEfav { my $windir="C:\\windows\\favori~1"; my @FILELIST=glob ("$windir\\*.url"); my ($url, $file, @URLS); foreach $file (@FILELIST) { open (URLFILE, $file); @URLS = <URLFILE>; foreach (@URLS) { /.*URL=(.*)/; $url=$1; } $file=~/^C:\\windows\\favori~1\\(.+)\.url$/; print "<A href=\"$url\"> $1 <\/A><BR>\n"; close URLFILE; } sub operafav { my $operadir="C:\\Program Files\\Opera"; my $name=""; open (URLFILE, "$operadir\\opera5.adr"); foreach (<URLFILE>) { if (/^\s*NAME=(.*)/) { $name=$1; } elsif (/^\s*URL=/) { my $url=/^\s*URL=(.*)/; print "<A href=\"$1\"> $name <\/A><P>\n"; } } close URLFILE; }

Replies are listed 'Best First'.
Re: Real-time IE "my favorites" shown as links on site
by OeufMayo (Curate) on Dec 13, 2000 at 04:00 UTC

    Mmh, that suppose that the 'user' of this CGI have access to your "c:/windows/" directory? Isn't it a big security flaw?

    If I were you I'd launch a 'at' command, scheduling the retrieval of your IE Favorites, and writing it to a file served by your server. And finally, switch to Opera 5 (shameless plug).

    <kbd>--
    PerlMonger::Paris(http => 'paris.pm.org');</kbd>