shortThisUrl($url, $s); if(is_bool($ret) && !$ret){ echo 'alert("'.ShortURL::STATE_ERROR.'");'; exit; } elseif($ret === ShortURL::STATE_ALREADY_EXIST){ echo 'alert("'.$ret.'");'; exit; } else{ echo 'alert("Raccourci créé : http://'.$_SERVER['SERVER_NAME'].$folder.rawurlencode($newname).'");'; exit; }