FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » where else can this list be found?
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
where else can this list be found? [message #170639] Fri, 12 November 2010 21:57 Go to previous message
richard is currently offline  richard   
Messages: 213
Registered: June 2013
Karma:
Senior Member
http://krakjoe.com/geoip/query=code&address=remote

I found this code I would like to use as a spam blocker.
Since it calls the information from a file rather than an array.
I could make up my own file to install on my site.
I just need to know where I can get the same basic information as this site
is apparently gone.

<?php
# array of country codes you wanna block
$block_countries = array(
'GB',
'US'
);
# grab the country code from krakjoe.com
if( !in_array( file_get_contents(
'http://krakjoe.com/geoip/query=code&address=remote' ), $block_countries )
) :
# the following page will only be displayed to users who have a country
code that is NOT in the array at the top of the example
?>
<html>
<head>
<title>You're allowed to view this page</title>
</head>
<body>
viewing the page, oh yeah baby .....
</body>
</html>
<?php
endif;
?>


I would change the !in_array to in_array then send those blocked to a
specific page before they even get into my forum site.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Why don't I get a deprecation warning?
Next Topic: Variable expansion <?=$foo?> not working anymore
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Nov 24 02:38:43 GMT 2024

Total time taken to generate the page: 0.04100 seconds