Php

Podcast Support in Weblog Pinger

I have updated Weblog-Pinger, a weblog update notification class library for PHP, to support podcasting. When a new weblog entry contains an audio enclosure, you can ping Audio.Weblogs.Com, which in turn notifies a lot of services that monitor the site, such as the podcast directory GigaDial. One gotcha for anyone else working on Audio.Weblogs.Com notification: the site's XML-RPC server is at audiorpc.weblogs.com, not audio.weblogs.com, which I finally discovered when I read the documentation. ... (read more)

Weblog Update Notification in PHP

With help from Dave Sifry of Technorati, I have released Weblog_Pinger, a weblog notification class library for PHP that sends update pings over XML-RPC to services such as Weblogs.Com, Blo.gs, Ping-o-Matic and Technorati. The code has been released as open source under the GNU General Public License. Dave's going to be writing about this code on the Technorati Developers Wiki, which has an extensive section devoted to how to ping the site with weblogging software. ... (read more)

Thinking Outside the Box

Although I have been touting the new autoboxing and unboxing feature in Java 2 version 5, I didn't realize how far the language is willing to go with these automatic conversions. The following code doesn't work in version 4: public void setDeposit(Float deposit) {   if (deposit >= 0) {     this.deposit = deposit;   } } You can't use a comparison operator like ">" to compare a Float object and a float value -- an "incompatible types" error indicates ... (read more)

Addressing a PHP Name Resolution Glitch

My PHP error logs have been filling up with an ominous error message: PHP Warning: main(): php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution (is your IPV6 configuration correct? If this error happens all the time, try reconfiguring PHP using --disable-ipv6 option to configure) I don't know about the low-level cause for the problem, but I've figured out why it's happening so often on my server. I had the bad habit of using URLs in include statements for local ... (read more)

I Want to Be a Better Neuron

Looking at Technorati this morning, I realized that none of the entries on my hand-coded weblogs are showing up there, presumably because I haven't been sending update pings to weblog notification services like Weblogs.Com, Blo.gs, and Ping-o-Matic. For a weblog to be a properly firing neuron in the information-gathering nervous system that Jon Udell describes on InfoWorld, tools like Technorati must learn in real time what's being linked, and by whom. To fix this, I'm writing a PHP class ... (read more)

Closing Movable Type Comments

I'm winning the war on comment spam on Wordzilla, my homebrew weblog software, thanks to PHP code that rejects link-heavy comments and submissions from banned IP addresses. I'm losing on Movable Type and Manila. Both programs are being flooded with spam that has to be hand-deleted, a chore that's miserably time consuming in each. Six Apart enhanced Movable Type's comment-management features in version 3.1, but it can take up to five minutes to delete a group of spam comments on the Drudge ... (read more)

Canning Comment Spam

Workbench has been under attack lately by a comment spammer linking to dozens of cheesy .info domains. The sites sell drugs like Cialis and Phentermine, offer Texas Holdem poker, and pimp a bunch of other get-rich-click schemes. I'm writing my own software here in PHP and MySQL, so I'm trying to deal with this abuse as painlessly as possible. For several hours at a time, a new comment spam is being posted every 1-2 minutes on the 2,300 weblog entries on this site. In a comment management tool, ... (read more)

Handling 18.5 Janets of Web Traffic

The Drudge Retort was hammered yesterday, serving 10 gigabytes of traffic as thousands of people looked for exit polls and early election returns. The unit of measurement for traffic here is Janet Jackson's right breast, the exposure of which maxed out the shared SDSL connection on my old server. For seventeen straight hours, it served 144 kilobytes per second of traffic (1 Janet) to people on a fruitless search for celebrity mammary. Since that time, I have moved to dedicated server hosting ... (read more)

Using Your Header in UltraEdit

Since I began using UltraEdit as a programming text editor recently, I lost the ability to call the header() function in PHP. Every time I tried it in a script, the following error happened: "Cannot modify header information - headers already sent."This error happens whenever a script produces output before header() is called. When obvious causes for this problem have been ruled out, you must look for anything that might output a blank line or other characters.In my case, UltraEdit put three ... (read more)

Turning Off the Radio

Because I wrote the book on Radio UserLand, my decision to stop using the software on Workbench has raised a few eyebrows.By tradition, the first thing a weblogger must do with new software is publish a vicious excoriation of the old software, warning others to keep away, like a courageous relief worker marking a land mine.Textbook example: When Mark Pilgrim concluded that a Movable Type licensing change would have cost him $535, he declared the software a dead end, switched to WordPress, and ... (read more)