function test_getLandingPageUrlTargetUrl()
 {
     $expectedTarget = "http://target.url/?someprop=somevalue&another=value";
     $expectedLandingPageUrl = "http://www.mysplitpage.com/?t=http%3A%2F%2Ftarget.url%2F%3Fsomeprop%3Dsomevalue%26another%3Dvalue";
     $queue = QueueFactory::createQueueFromConfiguration("queue1");
     $actualLandingPageUrl = $queue->getLandingPageUrl($expectedTarget);
     $this->assertEqual($expectedLandingPageUrl, $actualLandingPageUrl);
 }
<?php

// IMPORTANT !
// Never call request validation from error handling pages (e.g. error.php) which will cause users to get looped arround.
require_once '../QueueIT.Security/QueueFactory.php';
use QueueIT\Security\QueueFactory;
$queueName = $_GET['queuename'];
$queue = QueueFactory::CreateQueueFromConfiguration($queueName);
//Buffer larger content areas like the main page content
ob_start();
?>
    <div>An error occured.</div>
    <div>
        <a href="index.php">Back To Home</a> <a href="<?php 
echo $queue->getCancelUrl($_GET['t']);
?>
">Go to queue</a>
    </div>
	
<?php 
//Assign all Page Specific variables
$body = ob_get_contents();
ob_end_clean();
$title = "Error Page";
//Apply the template
include "master.php";
<?php

require_once '../QueueIT.Security/QueueFactory.php';
use QueueIT\Security\QueueFactory;
$queue = QueueFactory::CreateQueueFromConfiguration('link');
function getTargetUrl()
{
    $ssl = isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == "on";
    $pageURL = 'http';
    if ($ssl) {
        $pageURL .= "s";
    }
    $pageURL .= "://";
    if (!$ssl && $_SERVER["SERVER_PORT"] != "80" || $ssl && $_SERVER["SERVER_PORT"] != "443") {
        $pageURL .= $_SERVER["SERVER_NAME"] . ":" . $_SERVER["SERVER_PORT"] . '/linktarget.php';
    } else {
        $pageURL .= $_SERVER["SERVER_NAME"] . '/linktarget.php';
    }
    return $pageURL;
}
//Buffer larger content areas like the main page content
ob_start();
?>
    <h3>Setting up the queue:</h3>
    <ol class="round">
        <li class="one">
            <h5>Write Known User code</h5>
            Add Known User code to the php page. The target php 
            page contains code to extract and persist information about a queue number. </li>
    </ol>
    
<?php

require_once '../QueueIT.Security/QueueFactory.php';
use QueueIT\Security\QueueFactory;
$queue = QueueFactory::CreateQueueFromConfiguration('advanced');
//Buffer larger content areas like the main page content
ob_start();
?>

<a href="index.php">Back To Home</a> <a href="<?php 
echo $queue->getQueueUrl($_GET['t']);
?>
">Go to queue</a>

	
<?php 
//Assign all Page Specific variables
$body = ob_get_contents();
ob_end_clean();
$title = "Advanced Queue Landing Page";
//Apply the template
include "master.php";
 static function createQueue($customerId, $eventId)
 {
     return QueueFactory::instantiateQueue($customerId, $eventId, null, null, false, false, null, null);
 }