PW Forum / Can't open Digg URL

You are not logged in.


#1 2007-11-02 19:05:00

TokyoTech
New member
Registered: 2007-11-02
Posts: 2
Website

Can't open Digg URL

I'm practicing using multiple API libraries. You can see my current progress here:

http://levichi.com/forum/learn/index2.php

I am having trouple with the Digg API. Scroll to the bottom of that page to see. It says that this URL cannot be opened:

http://services.digg.com/stories/topic/ … _date-desc

However, when I copy and paste that URL into a web browser, I can see the XML just fine. Is my format wrong?

This is my code. I have almost identical functions in all my other API's libraries.  But it doesn't work in my Digg library. I am using an XML class/parser from here:

http://blog.f4l.be/tutorials/xml_parse.phps

function storySearch($topic, $count)
{
        $count = $this->constrainCount($count);

        $url = $this->baseURL . 'stories/topic/' .
                         $topic . '?' .
                         'appkey=' . $this->keyAPI .
                         '&count=' . $count .
                         '&sort=promote_date-desc';

        echo $url . '<br />';

        // line causing the error, any line after this
        // does not get executed.
        $feed = new XML($url);
................

Last edited by TokyoTech (2007-11-02 19:10:08)

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson

Follow the PW team on Twitter

ProgrammableWeb
APIs, mashups and code. Because the world's your programmable oyster.

John Musser
Founder, ProgrammableWeb

Adam DuVander
Executive Editor, ProgrammableWeb. Author, Map Scripting 101. Lover, APIs.