Difference between revisions of "Class.jaiku.php"
(Added Known Issues.) |
|||
Line 24: | Line 24: | ||
Assuming you have a Jaiku.com account, and you substitute the proper values for "username" and "password," this code should update your Jaiku presence, location and icon: visit Jaiku.com to see if it worked. | Assuming you have a Jaiku.com account, and you substitute the proper values for "username" and "password," this code should update your Jaiku presence, location and icon: visit Jaiku.com to see if it worked. | ||
+ | |||
+ | ==Known Issues== | ||
+ | |||
+ | The code breaks if the PHP script you call it from isn't in the same directory as class.jaiku.php. I'll fix this shortly. | ||
+ | |||
+ | There's no error reporting at all, so if it fails, you'll never know. |
Revision as of 16:26, 21 December 2006
class.jaiku.php is an PHP5 class that allows for basic interaction with Jaiku. At present the useful functionality is limited to updating your Jaiku presence programmatically.
Jaiku doesn't have a public API yet, so all of the magic is done be sending standard HTTP POSTs to Jaiku.com -- pretending to be a web browser, in other words.
Source Code
You can browse the source code from a browser, or grab the latest version of the source code using Subversion at:
You can grab the latest version of the source code using Subversion at:
svn://svn.reinvented.net/Jaiku/JaikuPHP
or
http://svn.reinvented.net/Jaiku/JaikuPHP
Sample Usage
require_once("class.jaiku.php"); $j = new Jaiku("username","password"); $j->UpdatePresence("Updating my presence from PHP!","My City, My Country",'333');
Assuming you have a Jaiku.com account, and you substitute the proper values for "username" and "password," this code should update your Jaiku presence, location and icon: visit Jaiku.com to see if it worked.
Known Issues
The code breaks if the PHP script you call it from isn't in the same directory as class.jaiku.php. I'll fix this shortly.
There's no error reporting at all, so if it fails, you'll never know.