Php
I recently began using Twitter, a microblogging service for posting short, chat-like blog entries and reading what other users of the service are doing. The site has severe reliability problems, but it's still an entertaining way to get real-time updates from bloggers I read along with others I know who've been sucked into Twitter's maw. I wrote some code to display my most recent Twitter update on my weblog, Workbench, in a sidebar at upper right. This afternoon, I've released the ... (
read more)
I returned from a trip out of town Monday to crashing web servers that ate my lunch all week long. For several days, I used the top command in Linux and watched helplessly as two servers ground to a halt with load averages higher than 100. Top reports the processes that are taking up the most CPU, memory and time. On the server running Workbench, the culprit was always httpd, the Apache web server. This didn't make sense, because Apache serves web pages, images, and other files with incredible ... (
read more)
I serve ads on the Drudge Retort using Blogads, a great ad broker that occasionally has trouble serving the ads. When this happens, pages on the Retort load more slowly because they can't fetch a Javascript program and CSS stylesheet required by Blogads. I decided to fix this problem by writing Cache Remote File, a PHP script that performs three functions: Save a cached copy of a remote file Display the cached copy for 10 minutes before requesting the file again Display the cached copy when the ... (
read more)
I've added a MySQL database to Weblog-Pinger, my weblog update notification class library for PHP, so that it can track ping attempts and keep from hitting the same server too often. Some notification services reject pings sent too frequently. When I was the king of pings for six months in 2005, Weblogs.Com rejected pings sent more frequently than once per half-hour. If you try to ping Ping-O-Matic too often today, you get the error message "Pinging too fast. Slow down cowboy. Please ping no ... (
read more)
Over the weekend most of my new WordPress MU weblog servers were hit by splogs -- spam blogs created by bots and filled with links to commercial sites. I added a WordPress hacker's unofficial patch that requires users to fill out a captcha to create a new blog. The patch modifies wp-signup.php and adds a new file, wp-valid.php that generates the captcha graphic using code from the Quick Captcha PHP script. The first two active blogs to spring up on these servers are Political Fretwork and the ... (
read more)
Because I don't want to add captchas to Workbench, this weblog has been drowning in comment spam. Since I began accepting comments in September 2002, I've received 13,000 legitimate comments and 172,000 spam. I'm trying a new technique this week that makes spam easy to detect by putting a bunch of bogus text areas on a weblog form, hiding them with Cascading Style Sheets, and checking them for input when the comment is submitted. I call these fields comment flak. Spammers typically put their ... (
read more)
I switched to Atom 1.0 on Workbench two months ago, a move that hasn't been as smooth as I'd like because of one popular aggregator that doesn't support the format. This site is created using Wordzilla, a LAMP-based weblog publishing tool that I've developed over the last year. Writing code to generate Atom feeds in PHP was extremely simple, since most of the code used to generate RSS feeds could be applied to the task. Atom uses a different format for date-time values than RSS, so I had to ... (
read more)
I've reached an agreement with Dave Winer regarding the Share Your OPML web application. I destroyed his original code and user data along with everything that was built from it and gave up my claim to a one-third stake in feeds.scripting.com. He gave up the claim that he's owed $5,000. I originally hoped one of us would buy the other out and launch the application, but we found a much stronger basis for agreement in a mutual desire to stop working together as quickly as possible. If Share Your ... (
read more)
Earlier this week, Mozilla Firefox developer Darin Fisher announced that test builds of the browser include support for click pings, an experimental new HTML feature that makes it easier for web sites to track clicks on outgoing links: I'm sure this may raise some eye-brows among privacy conscious folks, but please know that this change is being considered with the utmost regard for user privacy. The point of this feature is to enable link tracking mechanisms commonly employed on the web to get ... (
read more)
A few weeks ago, I mistakenly believed that I had closed a PHP mail form vulnerability that let spammers use my web server to send mail. Another batch of penis enlargement and phentermine pitches were sent through my server last night, which I discovered when "rejected bulk e-mail" bounces found their way to me. A spammer exploited a mail script I had written that coded the recipient address like this: $recipient = "info@ekzemplo.com"; I thought the script was secure because users couldn't ... (
read more)
Read More Entries