if (substr($link,0,17)=="http://127.0.0.1/")
{
echo"errore";
}else{

echo"ok";
}



prova...