Is there a way to check if a twitter username exists? Without being authenticated with OAuth or the twitter basic authentication?
As API v1 is no longer available, here is another way to check if a twitter account exists. The page headers of a non existing account contain 404 (page not found).
function twitterAccountExists($username){
$headers = get_headers("https://twitter.com/".$username);
if(strpos($headers[0], '404') !== false ) {
return false;
} else {
return true;
}
}