PHP code example of orkan / filmweb-api
1. Go to this page and download the library: Download orkan/filmweb-api 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/ */
orkan / filmweb-api example snippets
use Orkan\Filmweb\Filmweb;
use Orkan\Filmweb\Api\Method\isLoggedUser;
// Login to Filmweb
$filmweb = new Filmweb( $login, $password );
$api = $filmweb->getApi();
// Get user info
$api->call( 'isLoggedUser' );
$user = $api->getData();
$userId = $user[ isLoggedUser::USER_ID ];
// Get a list of voted films
$api->call( 'getUserFilmVotes', array( $userId ) );
$films = $api->getData();
// ...
print_r( $films );