It looks like you're new here. If you want to get involved, click one of these buttons!
<i class="Italic">public function loginlive1() {
$kite = new Kiteconnect("xxxxx");
$url = $kite->getLoginURL();
print_r($url);
}</i>
2. Login to kite<i class="Italic">public function loginlive2() {
$kite = new Kiteconnect("xxx");
$user = $kite->generateSession("xxx", "xxx");
$kite->setAccessToken($user->access_token);
print_r($kite);
}</i>
5. Get positions (3rd funtion)
<i class="Italic">public function index() {
$kite = new Kiteconnect("xxx");
print_r($kite->getPositions());
}</i>
After performing all the previous steps successfully I get the following error
$kite->setAccessToken($user->access_token);
before$kite->getPositions()
You will have to store access token inside a database(recommended) or in a file and use that for subsequent calls.