Justgiving.com API & Dynamic graphic widgets
Posted on March 24, 2009 - Filed Under Code | 5 Comments
I decided to write these quickly as the I found the justgiving.com image widgets didn’t contain relevant event information, and didn’t fancy using their flash widget… anyhow here goes.
Justgiving.com widgets (unofficial)
You can view you automatically generated widget like this:
<img src=”http://api.jo.je/justgiving/view/paras10″>
And replace paras10 with your justgiving.com page name
For events without targets, they will look like this:
<a [...]
PHP 4 Twitter Class
Posted on January 28, 2009 - Filed Under Code, Projects | 2 Comments
I say class, it’s actually just 1 function for PHP 4+ to allow sending of twitter messages really simply.
Based upon the PHP 5 twitter class by David Grudl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
function twitter_send($message, $user, $pass)
{
$url = ‘https://twitter.com/statuses/update.xml’;
$post = array(’status’ => $message);
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_USERPWD, $user.":".$pass);
curl_setopt($curl, CURLOPT_HEADER, FALSE);
curl_setopt($curl, CURLOPT_TIMEOUT, 20);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($curl, CURLOPT_HTTPHEADER, array(’Expect:’));
if ($post) {
curl_setopt($curl, CURLOPT_POST, TRUE);
curl_setopt($curl, [...]








