Category Archives: php

Social butterflies part 2

In my earlier blog post Social butterflies, I had difficulty getting the sociable plugin. I’m not sure why the site wouldn’t load then, as it happily loads now. Anyhow, I’ve activated the sociable plugin, instead of my own.. with a couple of changes, and it is very easy to add new social bookmarks to the […]

Widgetizing plugins - popularity code & wordpress

I added a little PHP to my Popularity plugin to allow me to plug it into this here Theme without needing to edit the Sidebar.php - which wouldn’t be an issue (this time) but I’ve changed theme 3 times today - so enough is enough!
// Widget stuff
function widget_most_pop_register() {
if ( function_exists(’register_sidebar_widget’) […]

CakePHP - Ohloh

CakePHP - Ohloh
This is an interesting looking project - perhaps some baking is a good idea for us here at NZfusion.
The manual has some useful implementation examples, like how to make a blog.

php-mysql connection charset fix

In my earlier post php-mysql connection charset fix, I mentioned I was having issues with enforcing an UTF8 charset. I found the solution:
@$conn = new mysqli(DB_SERVER, DB_USER, DB_PASS, DB_NAME);
// or die(mysql_error());
if (!$conn||mysqli_connect_errno())
{
throw new Exception(’Could not connect to database server:’.
mysqli_connect_error());
}
else
{
$conn->query( “SET NAMES ‘utf8′” );
$conn->set_charset(”utf8″);
return $conn;
}

MaxMind - GeoIP PHP API

MaxMind - GeoIP PHP API Cool, IP based GeoLocator… for PHP and a number of other web software languages. As demonstrated on YouGetSignal.