userMedia(); $rand_no = rand(); if ($username == '' && $access_token == '') { $response = array('meta' => array('error_message' => 'Username and access token field is empty. Please configure.')); } else if ($username == '') { $response = array('meta' => array('error_message' => 'Username field is empty.')); } else if ($access_token == '') { $response = array('meta' => array('error_message' => 'Access token field is empty.')); } else { $response = $insta->userMedia(); } if ($response == NULL) { $response = array('meta' => array('error_message' => 'Username field is empty.')); } $ins_media = $response; ?>