masnathan/strawpool-php

Simple class that allows you to use strawpool on your website.

0.1 2014-01-06 23:48 UTC

README

Downloads with Composer SensioLabs Insight ReiDuKuduro @gittip

Simple class that allows you to use strawpool on your website

How to install via Composer

The recommended way to install is through Composer.

# Install Composer
$ curl -sS https://getcomposer.org/installer | php

# Add strawpool-php as a dependency
$ php composer.phar require masnathan/strawpool-php:*

Once it's installed, you need to require Composer's autoloader:

require 'vendor/autoload.php';

How to use

$pool = new Strawpool('Title', array('option1', 'option2'), $multiple_choice = true, $permissive = false);

//you can can the iframe html doing this
echo $pool->getHtml($width = 600, $height = 332, $border = 0);
//or simply
echo $pool;

//The pool id is also available so you can do whatever you feel like
echo $pool->id;

License

This library is under the MIT License, see the complete license here