PHP code example of retrowaver / strawpoll-voter
1. Go to this page and download the library: Download retrowaver/strawpoll-voter library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
retrowaver / strawpoll-voter example snippets
use Retrowaver\Strawpoll\Strawpoll;
$strawpoll = new Strawpoll;
$successCount = $strawpoll->vote(
'1234567890',
'12345',
[
'192.168.1.1:8080',
'192.168.1.1:8081',
'192.168.1.1:8082',
'192.168.1.1:8083'
]
);
echo $successCount; // hopefully 4!