Bannir IP d'un site
Yassinedu74
Messages postés
1
Date d'inscription
Statut
Membre
Dernière intervention
-
Fallentree Messages postés 2309 Date d'inscription Statut Membre Dernière intervention -
Fallentree Messages postés 2309 Date d'inscription Statut Membre Dernière intervention -
Bonjour, je voulait vous demander si ont pouver créer un srcipt pour bannir un ip d'un site si oui comment faire merci à celuit qui me repondras.
A voir également:
- Bannir IP d'un site
- Ethernet n'a pas de configuration ip valide - Guide
- Site de telechargement - Accueil - Outils
- Site comme coco - Accueil - Réseaux sociaux
- Quel site remplace coco - Accueil - Réseaux sociaux
- Comment connaître son adresse ip - Guide
3 réponses
Attention chez certain hebergeur les IP ne sont pas fixes...
En php, y a une variable $_SERVER['REMOTE_ADDR'];
tu fais
En php, y a une variable $_SERVER['REMOTE_ADDR'];
tu fais
<?php $Paslui="167.192.1.11"; if ($_SERVER['REMOTE_ADDR']!=$Paslui) { $header="https://forums.commentcamarche.net/forum/affich-24723344-bannir-ip-d-un-site";} else $header="ma page index.php"; ?> script ====>window.location.replace("<?php echo $header;?>");
<?php
echo $_SERVER['REMOTE_ADDR'];
$Paslui="127.0.0.1";
if ($_SERVER['REMOTE_ADDR']!=$Paslui) { $header="https://forums.commentcamarche.net/forum/affich-24723344-bannir-ip-d-un-site";} else $header="";
?>
<script>
<?php if ($header!="") {?>");
window.location.replace("<?php echo $header;?>");
<?php } ?>");
</script>
echo $_SERVER['REMOTE_ADDR'];
$Paslui="127.0.0.1";
if ($_SERVER['REMOTE_ADDR']!=$Paslui) { $header="https://forums.commentcamarche.net/forum/affich-24723344-bannir-ip-d-un-site";} else $header="";
?>
<script>
<?php if ($header!="") {?>");
window.location.replace("<?php echo $header;?>");
<?php } ?>");
</script>