Main
Latest
- Optimus Microformats Parser
- XFN Discovery
- Google Social Graph API
- ISDSL Stats
- Twitter Pwned Again
- Jabber ID Change
- charlvn.za.net downtime
- Neotel NeoConnect Price Comparison
- Eskom? No, the stove!
- Back in George!
Archives
- June 2004
- July 2004
- August 2004
- September 2004
- October 2004
- November 2004
- December 2004
- January 2005
- February 2005
- March 2005
- April 2005
- May 2005
- June 2005
- July 2005
- August 2005
- September 2005
- October 2005
- November 2005
- December 2005
- January 2006
- February 2006
- March 2006
- April 2006
- May 2006
- June 2006
- July 2006
- August 2006
- September 2006
- November 2006
- December 2006
- January 2007
- February 2007
- March 2007
- April 2007
- May 2007
- June 2007
- July 2007
- August 2007
- September 2007
- October 2007
- November 2007
- December 2007
- January 2008
- February 2008
- March 2008
- April 2008
- May 2008
- June 2008
- July 2008
- August 2008
- September 2008
- October 2008
- November 2008
- December 2008
- January 2009
Plurk PHP Post Script
Plurk seems to be the latest South African internet obsession. As various people including Stii mentioned, Plurk lacks an API. That never got me down though. Most people would probably like to have a script to post updates, so I thought I should start with that.
<?php
$curl = curl_init();
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_COOKIEJAR, 'cookie.txt');
curl_setopt($curl, CURLOPT_COOKIEFILE, 'cookie.txt');
curl_setopt($curl, CURLOPT_URL, 'http://www.plurk.com/Users/login');
curl_setopt($curl, CURLOPT_POSTFIELDS, 'nick_name=noob&password=pwned');
curl_exec($curl);
curl_setopt($curl, CURLOPT_URL, 'http://www.plurk.com/TimeLine/addPlurk');
curl_setopt($curl, CURLOPT_POSTFIELDS, 'qualifier=%3A&content=' . urlencode('i r l33t h4x0r') . '&lang=en&no_comments=0');
curl_exec($curl);
curl_close($curl);
The script is simple enough to be self-explanatory but please comment if you have any questions.
Copyright © 2004-2009 Charl van Niekerk. All articles are released under the Creative Commons Attribution 2.5 South Africa licence, unless where otherwise stated.


2 Comments
Comment by
Neville Newey on Wednesday, June 04, 2008 9:05:00 PM
Nice one Charl! Will try a Pythonised version and report back :)
I have given up trying to use Jabber for automated posts, their Jabber support is just too dodgy right now.
Comment by
Charl van Niekerk on Wednesday, June 04, 2008 10:12:00 PM
Yeah the Jabber support is really scaly at the moment unfortunately.... I hope they manage to sort that out soon as that's a major thing for me personally.
Post a Comment