Be carefuliIf you use this one:

Why? Because it's wrote with mssql. Which is no more in php by default.
You may try this but i don't know if it will work:
PHP Code:
// Check IP Address count----Credits to Abrasive
$ipcheck = ("SELECT COUNT(UserUID) AS num_accounts FROM PS_UserData.dbo.Users_Master WHERE UserIp = '{$user_ip}'");
$result = odbc_fetch_array($ipcheck);
if($result['num_accounts'] > 5 ){
$errors[] = 'You have created too many accounts under this IP address already, sorry for the inconvenience.';
@ShaiyaDeadlyBreath: Try with removing the last "}" of my code. i removed from the code above.