IPv6 Resources

Educating Yourself about IPv6

ARIN's guide to IPv6 preparedness

Sam's IPv6 Class Resources

Graph

Shame IPv4 Users!

To add this box to your page, insert the code below the examples. All of them are on a transparent background. The only differences are the font color and whether the IP address is shown.

Viewed over IPv4

Viewed over IPv6

Live

<iframe src="http://attack.samsclass.info/ip1.php" width="200" height="80"></iframe>

Viewed over IPv4

Viewed over IPv6

Live

<iframe src="http://attack.samsclass.info/ip2.php" width="200" height="80"></iframe>

Viewed over IPv4

Viewed over IPv6

Live

<iframe src="http://attack.samsclass.info/ip3.php" width="200" height="50"></iframe>

Viewed over IPv4

Viewed over IPv6

Live

<iframe src="http://attack.samsclass.info/ip4.php" width="200" height="80"></iframe>

Viewed over IPv4

Viewed over IPv6

Live

<iframe src="http://attack.samsclass.info/ip5.php" width="200" height="80"></iframe>

PHP Source Files

If you want to do this yourself, feel free! Here's the PHP I used for ip5.php, my favorite:

<div align="center" valign="middle">
<small><font color="white">
Your IP Address is
<strong><?php echo $_SERVER['REMOTE_ADDR']; ?></strong>
<br>
<?php

if (preg_match("/:/", $_SERVER['REMOTE_ADDR'])) {
echo "You've got IPv6!<br>";
echo "<a href='http://attack.samsclass.info/shamev4.htm' target='_blank' style='color: #ffffff;'>More information</a>";
} else {
echo "You still use IPv4 :(<br>";
echo "<a href='http://attack.samsclass.info/shamev4.htm' target='_blank' style='color: #ffffff;'>More information</a>";
}

?>
The others are trivial modifications.

Counters

I realized I could collect data on views over IPv4 and IPv6. (I don't collect anything else intentionally.) So I modified the script to this:

<div align="center" valign="middle">
<small><font color="white">
Your IP Address is
<strong><?php echo $_SERVER['REMOTE_ADDR']; ?></strong>
<br>
<?php

if (preg_match("/:/", $_SERVER['REMOTE_ADDR'])) {
echo "You've got IPv6!<br>";
echo "<a href='http://attack.samsclass.info/shamev4.htm' target='_blank' style='color: #ffffff;'>More information</a>";

$my_file = 'countv6';

} else {
echo "You still use IPv4 :(<br>";
echo "<a href='http://attack.samsclass.info/shamev4.htm' target='_blank' style='color: #ffffff;'>More information</a>";

$my_file = 'countv4';
}


$fp = fopen($my_file, 'c+');
flock($fp, LOCK_EX);

$count = (int)fread($fp, filesize($my_file));
ftruncate($fp, 0);
fseek($fp, 0);
fwrite($fp, $count + 1);

flock($fp, LOCK_UN);
fclose($fp);

/* PHP incrementing code from http://stackoverflow.com/questions/10874950/php-increment-a-counting-variable-in-a-text-file */

?>
</font></small>
</div>
This page has been accessed at least several times since the counter was last reset, or 12-27-12, whichever is more recent.

Posted 12-26-12 12:33 am by Sam Bowne

Counters added 12-27-12 9:39 am
Counter script modified to be thread-proof 12-27-12 11:54 am
Weekly log added 10:04 pm 12-27-12
Graph added 12:15 pm 1-20-13