# \[PHP\] del.icio.us API

**URL:** <https://forum.kirupa.com/t/php-del-icio-us-api/243171>\
**Category:** programming\
**Created:** [November 3, 2007, 8:00pm UTC](https://forum.kirupa.com/t/php-del-icio-us-api/243171 "2007-11-03T20:00:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![NeoDreamer](https://avatars.discourse-cdn.com/v4/letter/n/ccd318/32.png) [@NeoDreamer](https://forum.kirupa.com/u/NeoDreamer)\
**Post date:** [November 3, 2007, 8:00pm UTC](https://forum.kirupa.com/t/php-del-icio-us-api/243171/1 "2007-11-03T20:00:30Z")

</div>

I have trouble understanding the [del.icio.us](http://del.icio.us) API because their [documentation[/u] is very lacking. If you try to go to one of their feeds, such as [u]https://api.del.icio.us/v1/posts/get?tag=videogame&count=5](http://del.icio.us/help/api/), … it asks for your username and password, which is unlike any API I’ve dealt with. How are you supposed to deal with that?

So here’s the basic code that works for all [my other API’s[/u] (Flickr, Youtube, Last.FM, etc…), but doesn’t work for del.icio.us. It uses an [u][url=http://blog.f4l.be/tutorials/xml\_parse.phps]XML parser](http://levichi.com/forum/learn/index2.php).

```php

<?php
   include('XML.php');
   ini_set('user_agent', 'myName123');
   $deliciousQuery = new XML('https://api.del.icio.us/v1/posts/get?tag=videogame&count=5');
   echo 'this text will never be displayed because the URL couldn\'t be opened';
?>

```
