Archived

This forum has been archived. Please start a new discussion on GitHub.

PHP + Overriding Interface

To sum it up I am trying to develop a php script (not a web script), that would allow me connect to a Murmur server and get it to call a class that is used in the php script every time the someone connects to the Murmur server and tries to authenticate.

Documentation: Murmur::ServerAuthenticator

So far this is what I have
<?php
Ice_loadProfile();

$base = $ICE->stringToProxy("Meta:tcp -h 127.0.0.1 -p 6502");
$meta = $base->ice_checkedCast("::Murmur::Meta");

$servers = $meta->getAllServers();
foreach($servers as $s) {
	$id = $s->id();
	echo $id;
}
?>

I am stumped on how to create a local class that implements the interface. I have went though the documentation and it isn't making much sense to me. I tried doing this right before I get the server information...
class phpBBAuth extends ServerAuthenticator
{
	function authenticate($name, $pw, $newname, $groups)
	{
		
	}
}

However so far it keeps telling me that it can't find "ServerAuthenticator". I can't find a php example that does something along this line. Does anyone know how to do this?

Comments

  • mes
    mes California
    Hi,

    Ice for PHP doesn't support server-side activities, which means a script can't implement a callback interface. Do you know Python? :)

    Regards,
    Mark