<?php
/* * turn on error reporting */ error_reporting(-1); ini_set('display_errors', 1);
require realpath('radialsearch/radialsearch.class.php');
// create a pdo connection $dbh = new \PDO('mysql:host=localhost;dbname=qsnip', 'root', '');
// setup the pdo connection $dbh->setAttribute(\PDO::ATTR_ERRMODE,\PDO::ERRMODE_EXCEPTION ); $dbh->exec('SET NAMES utf8');
/* * Uncomment if the required table * is not installed yet */
#require realpath('radialsearch/databasesetup.php'); #databasesetup($dbh, realpath('radialsearch/setup.sql')); exit('Setup success.');
$search = new RadialSearch($dbh);
$search->setSource('Leopoldshöhe'); $search->setRadius(2); $result = $search->getResult();
print_r($result);
?>
|