Using the php Sample as a basis you can copy it and create your own plugin.