Got PHP? Need to ping weblogs.com?

For those of you who use PHP you can use this Weblogs Bug script to “ping” weblogs.com when you update. Basically you add two lines of php which load the library, and then check to see if the file has been updated.gnumatt

I’m not sure quite why, but the idea of having your weblog check itself when it is viewed, to see whether or not it needs to ping weblogs.com, really appeals to me. Sort of like brushing back your hair and checking your zipper before you answer the door. Maybe not very efficient, if your read:update ratio is high, but it doesn’t look like it would be all that expensive to run.

2 Comments

Comment by Marcus #
2002-03-20 03:33:09

Haven’t looked at the code yet – which is always a bad way to start a point – but how does this weblogs.com bug handle archives? I can imagine a situation where the current month’s archive could let a few fake pings through. They change along with the main blog page (but would have different sizes and lastMod times) and would be visited a lot through permalinks.

 
Comment by Phil Ringnalda #
2002-03-20 08:07:31

Erm, yes. I would think you would get two pings for every post, one from the main page and one from the archive page. I would be inclined to fix it by just hard coding the main page filename in, so that the archives check the main page as well, but that’s not very elegant. I see that he’s aware of the problem, but hasn’t posted his solution yet.

 
Name (required)
E-mail (required - never shown publicly)
URI
Your Comment (smaller size | larger size)
You may use <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <del datetime="" cite=""> <dd> <dl> <dt> <em> <i> <ins datetime="" cite=""> <kbd> <li> <ol> <p> <pre> <q cite=""> <samp> <strong> <sub> <sup> <ul> in your comment.