Re: How to make it shorter and better?



In article <e2v6ho$ht7$2@xxxxxxxxxxxxxxx>, "AlGorr" <a@xxxxx> wrote:

<snip>

It's pretty tight as it is.


# Setup
$ip = $_SERVER["REMOTE_ADDR"];
$timestamp = time()-900;

# Should we die?
$c = mysqlquery("select count(id) from banIP where ip = '$ip'");
list ($count) = mysql_fetch_assoc($c);
if ($count) die;

# Remove old stuff
mysql_query("delete from caspionet where timestamp < $timestamp");

# In Caspionet?
$c = mysqlquery("select count(id) from caspionet where ip = '$ip'");
list ($count) = mysql_fetch_assoc($c);
if (!$count){
mysql_query("insert into caspionet...");
}

# Who's online?
$ips = mysql_query("select distinct ip from caspionet");
while ($r = mysql_fetch_assoc($ips)){
print "IP: $r[ip]\n";
}






--
Sandman[.net]
.



Relevant Pages

  • Re: Setup funktioniert nicht mehr
    ... "Setup funktioniert nicht mehr": diese Meldung bekomme ich, wenn ich Office 2007 erneut installieren will. ... auf dem die Probleme auftraten? ...
    (microsoft.public.de.german.office)
  • Re: Where to stay.......
    ... 1BRs over there are to die for. ... Only problem is I'm guessing ... they can't be comped (similar setup over at Signature MGM, ...
    (alt.vacation.las-vegas)
  • WiFi / IE connection doesnt work (JC)
    ... recognition of my wireless home broadband router OK. ... setup... ... Jeff Cunningham ... "When I die, I want to die like my grandfather. ...
    (microsoft.public.pocketpc)
  • Re: OpenNETCF 1.3 (And site issue)
    ... sites out there for CF development was going to die! ... > You caught us while the website is being moved. ... >> Given how tight you guys have kept that ship, ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: Arbor Press attachment
    ... tunnel with two flat "gibb" plates to keep it tight. ... keeping the die halves in alignment. ... might look for pictures illustrating the U spring or strap linkage ...
    (rec.crafts.metalworking)