Check if a user exists


#1

I’m a little confused by the new API and I have no idea really how to use it. Before I could find tons of examples out there…so if someone could help me that would be fantastic:)
I know I have to create an application to start with which I did but now I’m trying to check if a user exists. Before I was doing this:
$apiURL=‘http://api.twitter.com/1/users/show.xml?screen_name=’.$twitter;
$json = file_get_contents($apiURL,0,null,null);
if (!@fopen($apiURL, ‘r’)){
$errors[count($errors)] = ‘That twitter account doesn’t exist’;
echo ‘That twitter account doesn’t exist’;
}

But it doesn’t work anymore. Any idea?

thanks