<?php include 'whitepages_lib.php'; include 'result.php'; if (isset($_POST['submit'])) { if (!empty($_POST['first_name'])) { if (!empty($_POST['last_name'])) { if (!empty($_POST['where'])) { $param = array('first_name' => trim($_POST['first_name']), 'last_name' => trim($_POST['last_name']), 'address' => trim($_POST['where'])); $whitepages_obj = new WhitepagesLib(); $api_response = $whitepages_obj->find_person($param); try { if ($api_response === false) { throw new Exception(); } $result = new Result($api_response); } catch (Exception $exception) { echo "Error Api response"; } } else { $error = 'Please enter city and state or zip.'; } } else { $error = 'Please enter last name.'; } } else { $error = 'Please enter first name.'; } }
<?php /** * Library for abstraction of methods to use Whitepages Pro API * @require PHP5 * * @author Kushal Shah * @date 2014-06-01 */ include 'whitepages_lib.php'; include 'result.php'; if (isset($_POST['submit'])) { if (!empty($_POST['street_line_1'])) { if (!empty($_POST['city'])) { $param = array('street_line_1' => trim($_POST['street_line_1']), 'city' => trim($_POST['city'])); $whitepages_obj = new WhitepagesLib(); $api_response = $whitepages_obj->reverse_address($param); try { if ($api_response === false) { throw new Exception(); } $result = new Result($api_response); } catch (Exception $exception) { echo "Error Api response"; } } else { $error = 'Please enter city and state or zip.'; } } else { $error = 'Please enter your address details.'; }
<?php /** * Library for abstraction of methods to use Whitepages Pro API * @require PHP5 * * @author Kushal Shah * @date 2014-06-04 */ include 'whitepages_lib.php'; include 'result.php'; if (isset($_POST['submit'])) { if (!empty($_POST['phone'])) { $param = array('phone' => trim($_POST['phone'])); $whitepages_obj = new WhitepagesLib(); $api_response = $whitepages_obj->reverse_phone($param); try { if ($api_response === false) { throw new Exception(); } $result = new Result($api_response); } catch (Exception $exception) { echo "Error Api response"; } } else { $error = 'Please enter phone number'; } }