<?xml version="1.0" encoding="UTF-8" ?>

<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
    <title>Posteet: ip</title> 
    <link>http://www.posteet.com/</link> 
    <description>Recent posteets posted to Posteet</description>
    <ttl>60</ttl>

    
    <item>
        <title>filebased ip lock</title>
        <link>http://www.posteet.com/view/1059</link>
        <description>
        <![CDATA[<pre>&lt;?php
$file = &quot;ip_data.dat&quot;;
$duration = 30*60;  //30 minutes

$lines = file($file);
foreach($lines as $line) {
    list($ip, $time) = explode(&quot;µ&quot;, $line);
    if($time &gt; time()-$duration) {
        $ips[$ip] = trim($time);
    }
}
$ip = $_SERVER['REMOTE_ADDR'];
if(@array_key_exists($ip, $ips)) {
    if($ips[$ip] &gt; time()-$duration) {
        // TRUE
        $ips[$ip] = time();
        $was_here = TRUE;
    }
} else {
    $ips[$ip] = time();
    $was_here = FALSE;
}
$fp = fopen($file, &quot;w&quot;);
foreach($ips as $ip=&gt;$time) {
    fputs($fp, $ip.&quot;µ&quot;.$time.&quot;\n&quot;);
}
fclose($fp);

if($was_here) {
    echo &quot;u was here within 30 minutes.&quot;;
} else {
    echo &quot;u wasn\'t here within 30 minutes.&quot;;
}
?&gt; </pre> <a href="http://www.posteet.com/tags/ip">[ip]</a>  <a href="http://www.posteet.com/tags/lock">[lock]</a>  <a href="http://www.posteet.com/tags/php">[php]</a> ]]>        </description>
        <dc:creator>sx</dc:creator>
        <pubDate>Tue, 08 Jul 2008 19:42:16 +0000</pubDate>

            <category>ip</category>
            <category>lock</category>
            <category>php</category>
    
    </item>

  
    <item>
        <title>How to check an IP address against blacklists using PHP</title>
        <link>http://www.posteet.com/view/751</link>
        <description>
        <![CDATA[<pre>function isBlacklisted($ip){
     $check = join('.',array_reverse(explode('.',$ip))).'.xbl.spamhaus.org.';
     return dns_check_record($check,'A');
}</pre> <a href="http://www.posteet.com/tags/blacklist">[blacklist]</a>  <a href="http://www.posteet.com/tags/dns">[dns]</a>  <a href="http://www.posteet.com/tags/ip">[ip]</a>  <a href="http://www.posteet.com/tags/php">[php]</a>  <a href="http://www.posteet.com/tags/spam">[spam]</a> ]]>        </description>
        <dc:creator>spirit</dc:creator>
        <pubDate>Wed, 13 Feb 2008 20:09:10 +0000</pubDate>

            <category>blacklist</category>
            <category>dns</category>
            <category>ip</category>
            <category>php</category>
            <category>spam</category>
    
    </item>

  
    <item>
        <title>Obtenir son adresse IP</title>
        <link>http://www.posteet.com/view/644</link>
        <description>
        <![CDATA[<pre># what is my IP?
alias myip='GET http://www.whatismyip.org &amp;&amp; echo &quot;&quot;'</pre> <a href="http://www.posteet.com/tags/bashrc">[bashrc]</a>  <a href="http://www.posteet.com/tags/ip">[ip]</a> ]]>        </description>
        <dc:creator>addikt1ve</dc:creator>
        <pubDate>Wed, 02 Jan 2008 14:46:38 +0000</pubDate>

            <category>bashrc</category>
            <category>ip</category>
    
    </item>

  
    <item>
        <title>Get your IP address using http://www.whatismyip.com</title>
        <link>http://www.posteet.com/view/563</link>
        <description>
        <![CDATA[<pre>lynx -dump http://www.whatismyip.com | grep -i &quot;Your IP is&quot; | awk '{ print $4; }'</pre> <a href="http://www.posteet.com/tags/awk">[awk]</a>  <a href="http://www.posteet.com/tags/bash">[bash]</a>  <a href="http://www.posteet.com/tags/ip">[ip]</a>  <a href="http://www.posteet.com/tags/lynx">[lynx]</a> ]]>        </description>
        <dc:creator>spirit</dc:creator>
        <pubDate>Mon, 10 Dec 2007 08:13:18 +0000</pubDate>

            <category>awk</category>
            <category>bash</category>
            <category>ip</category>
            <category>lynx</category>
    
    </item>

  
    <item>
        <title>Récupérer l'adresse ip publique</title>
        <link>http://www.posteet.com/view/216</link>
        <description>
        <![CDATA[<pre>#L'appel à iconv n'est nécessaire que si votre système utilise utf8 comme jeu de caractères par défaut (ce qui devient de plus en plus courant) au lieu d'iso8859-1 (latin-1).
wget -q www.monip.org -O -  | iconv -f iso8859-1 -t utf8 | sed -nre 's/^.* (([0-9]{1,3}\.){3}[0-9]{1,3}).*$/\1/p'</pre> <a href="http://www.posteet.com/tags/bash">[bash]</a>  <a href="http://www.posteet.com/tags/ip">[ip]</a>  <a href="http://www.posteet.com/tags/linux">[linux]</a>  <a href="http://www.posteet.com/tags/reseau">[reseau]</a>  <a href="http://www.posteet.com/tags/shell">[shell]</a> ]]>        </description>
        <dc:creator>bobuse</dc:creator>
        <pubDate>Mon, 05 Nov 2007 10:04:56 +0000</pubDate>

            <category>bash</category>
            <category>ip</category>
            <category>linux</category>
            <category>reseau</category>
            <category>shell</category>
    
    </item>

  
    <item>
        <title>Perl - Expression régulière pour tester la validité d'une adresse IP</title>
        <link>http://www.posteet.com/view/199</link>
        <description>
        <![CDATA[<pre>while($addr !~ /^([O1]?\d\d?|2[0-4]\d|25[0-5])\.([O1]?\d\d?|2[0-4]\d|25[0-5])\.([O1]?\d\d?|2[0-4]\d|25[0-5])\.([O1]?\d\d?|2[0-4]\d|25[0-5])$/){
		print &quot;Please give the IP address of the remote server:\n&quot;;
		$addr = get_answer();
	}</pre> <a href="http://www.posteet.com/tags/adresse ip">[adresse ip]</a>  <a href="http://www.posteet.com/tags/expression régulière">[expression régulière]</a>  <a href="http://www.posteet.com/tags/ip">[ip]</a>  <a href="http://www.posteet.com/tags/ip address">[ip address]</a>  <a href="http://www.posteet.com/tags/perl">[perl]</a>  <a href="http://www.posteet.com/tags/regex">[regex]</a>  <a href="http://www.posteet.com/tags/regular expression">[regular expression]</a> ]]>        </description>
        <dc:creator>henri</dc:creator>
        <pubDate>Mon, 05 Nov 2007 08:23:28 +0000</pubDate>

            <category>adresse ip</category>
            <category>expression régulière</category>
            <category>ip</category>
            <category>ip address</category>
            <category>perl</category>
            <category>regex</category>
            <category>regular expression</category>
    
    </item>

  
    <item>
        <title>IP forward sous linux</title>
        <link>http://www.posteet.com/view/55</link>
        <description>
        <![CDATA[<pre>echo &quot;1&quot; &gt; /proc/sys/net/ipv4/ip_forward</pre> <a href="http://www.posteet.com/tags/forward">[forward]</a>  <a href="http://www.posteet.com/tags/ip">[ip]</a>  <a href="http://www.posteet.com/tags/linux">[linux]</a> ]]>        </description>
        <dc:creator>spirit</dc:creator>
        <pubDate>Fri, 05 Oct 2007 11:43:02 +0000</pubDate>

            <category>forward</category>
            <category>ip</category>
            <category>linux</category>
    
    </item>


</channel>
</rss>
