PHP code example of dodysat / feederdikti
1. Go to this page and download the library: Download dodysat/feederdikti 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/ */
dodysat / feederdikti example snippets
$account = [
'ws_url' => "http://your-feeder-address/ws/live2.php",
'username' => "kode PT",
'password' => "Password Feeder",
'new_token' => false, // optional
'token_expiration' => 1200, // optional
];
$data = [
'act' => 'GetProfilPT',
];
$result = Feederdikti::action($account, $data);
print_r($result);
namespace App\Http\Controllers;
use App\Http\Controllers\Controller;
use Dodysat\Feederdikti\Feederdikti;
class YourControllerName extends Controller
{
public function index()
{
$account = [
'ws_url' => "http://your-feeder-address/ws/live2.php",
'username' => "kode PT",
'password' => "Password Feeder",
'new_token' => false, // optional
'token_expiration' => 1200, // optional
];
$data = [
'act' => 'GetProfilPT',
];
$dataFeeder = Feederdikti::action($account, $data);
return $dataFeeder;
}
}
$account = [
'ws_url' => "http://your-feeder-address/ws/live2.php",
'username' => "kode PT",
'password' => "Password Feeder",
'new_token' => false, // optional
'token_expiration' => 1200, // optional
];
$result = Feederdikti::checkConnection($account);
print_r($result);
$account = [
'ws_url' => "http://your-feeder-address/ws/live2.php",
'username' => "kode PT",
'password' => "Password Feeder",
'new_token' => false, // optional
'token_expiration' => 1200, // optional
];
$data = [
'act' => 'GetProfilPT',
];
$result = Feederdikti::action($account, $data);
print_r($result);