<?php
include 'binary_search.class.php';
$token = 'Zorita Wilkinson2';
try
{
$email = BinarySearch::find( 'data.csv', $token );
}
catch(Exception $e)
{
echo 'Exception: ' . htmlspecialchars( $e->getMessage() ) . '<hr/>';
}
if( empty( $email ) )
{
echo 'Sorry, email of ' . $token . ' was not found';
}
else
{
echo 'Email of ' . $token . ': ' . $email;
}
|