<?php include_once '../head.php'; if (!empty($_GET['id']) && !empty($_GET['username'])) { $id = $_GET['id']; $ig = new instagram(); $ig->get_user_media($id); $username = $_GET['username']; } elseif (empty($_GET['id']) && !empty($_GET[username])) { echo 'username by no id'; $username = $_GET['username']; header("location: http://iglookup.com/user/search/{$username}"); } include_once '../footer.php';