Posts Tagged ‘php’

WordPress plugin: Authentication

// juli 25th, 2010 // 46 Comments » // Cuvedev, Development, download, plugin, Wordpress

So, I finally submitted my first plugin to the WordPress plugin base.

It’s a plugin which add functionality to request visitors authentication before the website can be viewed. It doesn’t use HTTP Authentication, just php and html.
You can choose to use the WordPress authentication functionality to login, or give a password yourself.

Try it out, and give some feedback.

Link to Basic Authentication plugin

Screenshot:
options

 

– Update:

Now compatible with WordPress 3.3

Gowalla API Class (php)

// april 14th, 2010 // 18 Comments » // api, Cuvedev, Development, gowalla, php

I just quickly made a class for accessing the Gowalla API because I needed it myself. I looked for an existing class on the internet but could only find some crappy stuff on Google Code.
So I decided to make one myself.

The use of the class is fairly simple. Include the class file (don’t forget to add you API-key), make an instance and do your calls.
The class internally uses CURL to do the requests to the server and returns the data as an associative array.
I tried to document the methods enough so it’s easy to use them.

Example:

<!--?php
include('./class.gowalla.php');
$gowalla = new GowallaAPI();
$events	 = $gowalla--->getSpotEvents(846403);
foreach ($events['activity'] as $event)
{ // do stuff }
?&gt;

Feel free to download and comment.