Check if a user exists


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:
$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?