How to detect the physical connected state of a network cable/connector?

You want to look at the nodes in /sys/class/net/ I experimented with mine: Wire Plugged in: eth0/carrier:1 eth0/operstate:unknown Wire Removed: eth0/carrier:0 eth0/operstate:down Wire Plugged in Again: eth0/carrier:1 eth0/operstate:up Side Trick: harvesting all properties at once the easy way: grep “” eth0/* This forms a nice list of key:value pairs.

Stopping scripters from slamming your website

How about implementing something like SO does with the CAPTCHAs? If you’re using the site normally, you’ll probably never see one. If you happen to reload the same page too often, post successive comments too quickly, or something else that triggers an alarm, make them prove they’re human. In your case, this would probably be … Read more