PHP code example of lokal-so / lokal-php

1. Go to this page and download the library: Download lokal-so/lokal-php 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/ */

    

lokal-so / lokal-php example snippets




use LokalSo\Lokal;

$address = "127.0.0.1:8080";

$lokal  = new Lokal();
$tunnel = $lokal->newTunnel()
	->setName("laravel test")
	->setTunnelType(Lokal::TunnelTypeHTTP)
	->setLANAddress("laravel-backend.local")
	->setLocalAddress($address)
	->showStartupBanner()
	->ignoreDuplicate();

$ret = $tunnel->create();
sh
git clone https://github.com/lokal-so/lokal-php.git;
cd lokal-php;
composer install -vvv;
php example.php;