RE: [ydn-delicious] Re: related TAGS broken?

2007-03-30 Thread Joshua Schachter
If we posted every thing that broke or caught on fire, nobody would be
able to keep up :) 

 -Original Message-
 From: ydn-delicious@yahoogroups.com 
 [mailto:[EMAIL PROTECTED] On Behalf Of somercamb
 Sent: Thursday, March 29, 2007 8:50 AM
 To: ydn-delicious@yahoogroups.com
 Subject: [ydn-delicious] Re: related TAGS broken?
 
 Ok, but is there a reason why Delicious does not post these 
 types of announcements on their site or via the blog or an 
 updates section? 
 
 
 --- In ydn-delicious@yahoogroups.com, Joshua Schachter [EMAIL PROTECTED]
 wrote:
 
  Ah, now I recall - the recommendation server keeps falling 
 down, and 
  taking the site with it. We felt it'd be better to bring it 
 down and 
  sort it out when we had a breather.
  
  The recommendations were very stale anyway (the algorithm 
 hasn't been 
  able to keep up for months) and we need to rewrite it.
  
   -Original Message-
   From: ydn-delicious@yahoogroups.com 
   [mailto:[EMAIL PROTECTED] On Behalf Of somercamb
   Sent: Tuesday, March 27, 2007 6:29 AM
   To: ydn-delicious@yahoogroups.com
   Subject: [ydn-delicious] related TAGS broken?
   
   I saw a bunch of posts on related TAGS, but nothing on related 
   items. Is this function broken? It has not been working 
 for a few 
   weeks now. I even tested it with www.googl.com, 
 www.yahoo.com, and 
   Del.icio.us . It says del.icio.us did not find any 
 related items at 
   this time. 
   
   yes, this is a repost, but figured it is an easy YES or NO answer 
   and didn't get a response last time
   
   thank you
   
   
   

   Yahoo! Groups Links
   
   
   
  
 
 
 
 
 
  
 Yahoo! Groups Links
 
 
 
 


RE: [ydn-delicious] Suggestion for Daily Blog Post

2007-03-30 Thread Joshua Schachter
Yes, that's in the (eventual) todo list 

Joshua

 -Original Message-
 From: ydn-delicious@yahoogroups.com 
 [mailto:[EMAIL PROTECTED] On Behalf Of Paulo Diniz
 Sent: Thursday, March 29, 2007 6:24 PM
 To: ydn-delicious@yahoogroups.com
 Subject: [ydn-delicious] Suggestion for Daily Blog Post
 
 What about allowing Daily Blog Post to post only new entries 
 with a selected tag?
 
 This way users could have a simple way to control what ends 
 up published on their main blog's stream, just by adding one 
 extra tag that could be something like myblog.
 
 Currently, i have a del.icio.us most recent section on my 
 blog's sidebar showing all my public recent entries, but i'd 
 like to also have SOME of my new entries  registered on my 
 blog's post stream.
 
 Thanks for even considering,
 -Paulo
 
 
 
 
  
 Yahoo! Groups Links
 
 
 
 


Re: [ydn-delicious] Not able to access del.icio.us API services due to HTTP 401

2007-03-30 Thread Justin R. Miller
The del.icio.us API authentication is not cookie-based, but rather is  
HTTP authentication based:

http://del.icio.us/help/api/

So, with curl in PHP, you want to use:

curl_setopt($ch, CURLOPT_USERPWD, dummy007:gopal123);

on each request to provide the authentication info each time. An HTTP  
401 is either an initial challenge or a subsequent failed login over  
HTTP authentication.

You shouldn't have to worry about the cookie at all.

JM

On Mar 28, 2007, at 1:33 AM, gopalrulz wrote:

 Since accessing del.icio.us API services require Authentication ,i
 tried writing a PHP script which uses curl.The script does a login to
 del.icio.us(https://secure.del.icio.us/login) and then stores the
 authentication cookie in a file and then use the same cookie data to
 access the service (https://api.del.icio.us/v1/posts/update)

 But unfortunately i get a HTTP 401 - Not Authorised Error even though
 am passing the cookie.

 I have also pasted the PHP code .Kindly let me know where am going  
 wrong.

 ?php
 define(OK, 0);

 function do_curl($method, $url, $fields)
 {
 $retval = array('error_code' = 0, 'error_string' =
 'OK');
 $cookiejar = /tmp/cookiejar;

 $ch = curl_init();

 if($method == POST)
 {
 curl_setopt($ch, CURLOPT_POST, TRUE);
 curl_setopt($ch, CURLOPT_POSTFIELDS, $fields);
 }

 curl_setopt($ch, CURLOPT_URL, $url );
 curl_setopt($ch, CURLOPT_COOKIEJAR, $cookiejar);
 curl_setopt($ch, CURLOPT_COOKIEFILE, $cookiejar);
 curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);

 $result = curl_exec($ch);

 $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);

 $retval['result'] = $result;
 $retval['http_code'] = $http_code;

 curl_close($ch);

 return $retval;
 }

 function getupdate()
 {
 $url = https://api.del.icio.us/v1/posts/update;;
 $result = do_curl(GET, $url, array());

 if($result['error_code'] != OK)
 return $result;

 if($result['http_code'] != 200)
 {
 $retval = array();
 $retval['error_code'] = Error;
 $retval['error_string'] = HTTP Code :  .
 $result['http_code'];
 return $retval;
 }

 return $result;
 }

 $fields['user_name'] = dummy007;
 $fields['password'] = gopal123;
 $url = https://secure.del.icio.us/login;;;
 $retval = do_curl(POST, $url, $fields);

 print_r($retval);
 print_r(getupdate());
 ?

 Thanks,
 Gopal


 

-- 
Justin R. Miller
Code Sorcery Workshop
http://codesorcery.net