Results 1 to 11 of 11

Thread: weblogs.com and blo.gs ping checking

  1. #1
    Join Date
    Jul 2003
    Posts
    40

    Default weblogs.com and blo.gs ping checking

    Hi!
    My current software choice (wordpress.org), allows me to keep a list of weblog links and know when they are changed by automatically checking weblogs.com and blo.gs lists.

    Is it possible to implement this feature?

    Thanks!
    Ricardo

  2. #2
    Join Date
    Aug 2001
    Location
    Indonesia
    Posts
    3,732

    Default

    Honesly indexu is not weblog kind of software.

  3. #3
    Join Date
    Jul 2003
    Posts
    40

    Default well...

    Humm... I guess I didn't explain myself properly. I don't want to use Indexu as a weblog tool, I want to use it as an indexing tool to keep a list of weblogs.

    Weblogs.com and blo.gs have a service that list recently changed weblogs. This is done because they receive "pings" from the weblogs, with the name, url and timestamp of the updated weblog.
    A lot of weblog scripts like MoveableType, Blogger, etc has this feature.

    My current software, downloads the recently changed weblogs' list (in xml format) and allows me to sort my lists by the weblogs' update timestamp.
    So, instead of a list sorted by name:
    - Site A
    - Site B
    - Site C

    I can have a list sorted by last update:
    - Site C (last updated on 2003/09/15 23:32:45)
    - Site B (last updated on 2003/09/15 14:11:10)
    - Site A (last updated on 2003/09/15 06:44:00)

    Since I haven't the chance to look at the code, I want to ask, from a developer point of view, if you consider this possible and doable?

    Thanks! =)
    Ricardo
    Last edited by rbl; 07-14-2003 at 09:33 PM.

  4. #4
    Join Date
    Jul 2002
    Posts
    189

    Default Re: well...

    Originally posted by rbl
    I can have a list sorted by last update:
    - Site C (last updated on 2003/09/15 23:32:45)
    - Site B (last updated on 2003/09/15 14:11:10)
    - Site A (last updated on 2003/09/15 06:44:00)
    That's not a big deal. Some minor changes in a file called browse.php which pases a query value:
    Code:
    $links_obj->query .= "order by bid desc";
    to a library file called link.class.php. The default order is set to bid. Just change this to "date".


    Joerg
    Last edited by tjoerg; 07-15-2003 at 03:10 AM.
    --------- applying hacks require a knack ---------

  5. #5
    Join Date
    Apr 2003
    Location
    Atlanta GA
    Posts
    3,395

    Default Re: well...

    Originally posted by rbl

    I can have a list sorted by last update:
    as tjoerg suggests, sorting the links is easy.

    are you looking for more?

    How does the date updated?
    • Manually???
    • by "My current software, [which] downloads the recently changed weblogs' list????"
    • by INDEXU downloading the list and updating the link
    esm
    "The older I get, the more I admire competence, just simple competence, in any field from adultery to zoology."

    .

  6. #6
    Join Date
    Jul 2003
    Posts
    40

    Default

    Thanks Tjoerg and Esm!

    Like I said before, the idea is to hack indexu so it can download the xml list, parse its contents and then update its listings according to the timestamps found in the xml file.

  7. #7
    Join Date
    Apr 2003
    Location
    Atlanta GA
    Posts
    3,395

    Default

    OUCH! That makes my little brain hurt just thinking about it...

    That is what I thought.

    It is probably doable but it will take someone with a lot more expertise than me.

    can you give us an idea of what the download page looks like? Just a small sample.
    esm
    "The older I get, the more I admire competence, just simple competence, in any field from adultery to zoology."

    .

  8. #8
    Join Date
    Jul 2003
    Posts
    40

    Default

    Do you mean the xml list that indexu will have to parse? It's this one this one.

  9. #9
    Join Date
    Aug 2001
    Location
    Indonesia
    Posts
    3,732

    Default

    hmm... here I posted a snipped xml code
    PHP Code:
    <weblogUpdates version="1" updated="Wed, 16 Jul 2003 02:54:03 GMT" count="1039767">
      <
    weblog name="traces" url="http://www.sweetnsour.org/traces" when="13" /> 
      <
    weblog name="Babs - A Day In The Life" url="http://www.babineau.ca/journal/index.php" when="13" /> 
    Parsing xml is quite easy using expat/php. The information in xml is:
    - name
    - url
    - when

    I'm still not sure how this information will be processed. Please tell us more

  10. #10
    Join Date
    Jul 2003
    Posts
    40

    Default

    From what I can see, 2 simple functions called at the start and at the end of each line, do all the necessary parsing in the xml file.

    The startElement looks the most important of the two:
    Code:
    function startElement($parser, $tagName, $attrs) {
        global $updated_timestamp, $all_links;
        if ($tagName == 'WEBLOGUPDATES') {
            //convert 'updated' into php date variable
            $updated_timestamp = strtotime($attrs['UPDATED']);
            //echo('got timestamp of ' . gmdate('F j, Y, H:i:s', $updated_timestamp) . "\n");
        } else if ($tagName == 'WEBLOG') {
            // is this url in our links?
            //echo("wblogs.com link " .$attrs['URL']);
            $link_url = str_replace('www.', '', $attrs['URL']);
            $link_url = preg_replace('/(?:index|default)\.[a-z]{2,}/i', '', $link_url);
            //echo(" now equals $link_url\n");
            if (isset($all_links[$link_url])) {
                $all_links[$link_url][1] = gmdate('YmdHis', $updated_timestamp - $attrs['WHEN']);
                //echo('set link id ' . $all_links[$link_url][0] . ' to date ' . $all_links[$link_url][1] . "\n");
            }
        }
    }
    In fact, 3 small php files handle all the necessary functions related to link indexing.
    If you want to see this more carefully, you can download wordpress form their site

  11. #11
    Join Date
    Aug 2001
    Location
    Indonesia
    Posts
    3,732

    Default

    I see. That is clear enough. The codes can parse xml easy, you just need to store them in array, then insert them in indexu database.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •