This question already has an answer here:
I need to iterate over 15 cases, about 2 mio times per day. This cases are my "blocked ISPs list". If a visitor has this ISP, they will not see my site. When a visitor visits my site, its ISP will be detected and saved under $ISP. This is my current solution:
<?php
$ISP = "vodafone";
switch ($ISP) {
case "telecom":
x=1;
break;
case "vodafone":
x=1;
break;
...
default:
x=0;
}
?>
Aucun commentaire:
Enregistrer un commentaire