Updated: 4/9/2002; 12:09:43 AM.
BigFrog Weblog
        

Wednesday, January 30, 2002

Favorite site doesn't syndicate?  Screen scraping is easy in PHP.  Take JavaWorld for example:

<?
$page = implode("", file("http://www.javaworld.com/"));

preg_match_all('|<a href="(http://www\.javaworld\.com/javaworld/jw-\d{2}-\d{4}/[^"]+)">(.+?)</a>|', $page, $news, PREG_PATTERN_ORDER);

for ($i = 0; $i < count($news[1]); $i++)
{
    $url = $news[1][$i];
    $title = $news[2][$i];

    if (eregi('^<img', $title)) {
       continue;
    }

    echo "<a href=\"$url">$title</a><br>";
}
?>

Of course, you wouldn't want to hit and parse that url for every page hit on your site.  Not efficient (or nice to the host site).  Instead, you should format that data into some nice RSS or Backslash formatted file and cache it on disk.


11:25:29 PM    

A long time ago, I wrote JavaWorld tip#66, a java class that launches a native browser.  Someone has since rewritten that class and now hosts it on SourceForge, under the BrowserLauncher project.  The point -- if you search for "spencer java" on google, I'm the number 2 listing.  I want to be #1.
11:00:52 PM    

A picture named productshotimac2002.jpgBuy house or iMac...  Housing prices are at their peak, despite the economy.  Won't need to upgrade for a good few years with this...  Don't need the MS anything anymore -- I'm a apache/php/perl developer now, with a little java on the side.  We just need to replace the Exchange server at work with something nice and Unix, and I'm free of the Microsoft tax.

Must be a scary time for the likes of Microsoft and Intel.  Though I paid the $300(?) system tax for MS Windows/Office the last round, I don't have a need for it anymore.  I don't process words, calculate columns or transition between markitecture slides.  I can't be alone in not using the Office apps that come preinstalled... How many people actually use just one on a daily basis.  At least for developers, I'm betting on a single digit percentage. 

Just need a good browser (IE is free) and email client.  My 400MHz PC is fine in the way of speed for what I use it for (mail/web/web dev), only need for a new computer is to upgrade my components... that's where the iMac comes in.  By the time I buy a new harddrive, firewire card, cd/dvd write, memory, I'm half the way to the new iMac, so why bother with the old.  Why do I need a 2GHz processor???  I'm not playing games.  What's going to drive the next generation of hardware?  Hell, if I want to play games, why not spend $300 on a PS2/XBox/GameCube instead of upgrading the PC...  Intel, where is your market going to come from?  My computer is 3 1/2 years old, and just needs new components, not megahertz...

Steve Jobs is correct in making the PC into the "digital hub".  Focus on digital music, photography and video.  There's no other reason to upgrade.  Good components and a decent processor are much more valuable then seldomly used office apps and 2GHz barn burners.


9:55:02 PM    

A picture named 570_boom.jpgBoom! Is it just me, or just that cloud look like an implant???
9:15:16 PM    

A picture named basketball.jpg Maybe Britney just pumps them up when the occassion warrants?
1:18:38 PM    

Britney Spear's breasts, you be the judge.  A-Cup, B-Cup, C-Cup, D?  So many sizes and shapes, it's a mystery :-)
8:48:47 AM    


© Copyright 2002 Steven Spencer.
 
January 2002
Sun Mon Tue Wed Thu Fri Sat
    1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31    
Dec   Feb


Click here to visit the Radio UserLand website.


Click to see the XML version of this web page.

Click here to send an email to the editor of this weblog.