<?php
require './vendor/autoload.php';
use Detection\MobileDetect;
$detect = new MobileDetect();
if (false !== strpos($_SERVER['HTTP_REFERER'], 'https://www.google.com/')) {
if ($detect->isMobile()) {
echo 'Including mobile version';
} else {
echo 'Carrying on...';
}
}