Categories
Computer Programming Web

PHP Access Control List

A quick little Access Control List (ACL) snippet I made for PHP/HTML. Enjoy!

<?php

$acl = array(
    // Populate with IP/Subnet Mask pairs.
    // Any zero bit in the subnet mask acts as a wildcard in the IP address check.
    array("192.168.10.24","255.255.255.255"),
);

$acl_allow = false;
for ($i = 0; $i < count($acl); $i++) {
    $ip2chk = (ip2long($acl[$i][0]) & ip2long($acl[$i][1]));

    if ((ip2long($_SERVER['REMOTE_ADDR']) & $ip2chk) == $ip2chk) {
        $acl_allow=true;
    }
}

if ($acl_allow) {
    // Put all test stuff here!! Only visible to ACL.
    phpInfo();
} else {
    echo "<a href='http://this-page-intentionally-left-blank.org/whythat.html' target='_blank'>This page intentionally left blank.</a>";
}

?>

 

Categories
Computer Web

Expired Domains – A Headache (but a learning experience)

Hey all! It’s been a few months, I know. But I wanted to share an experience I had with my recent domain name headache.

So as you may or may not know, I’ve owned ppsstudios.com since May 2013. I purchased it via Google Apps which in turn set my registrar to eNom. Both are useful services and work reasonably well. I was attracted mostly to the (back in 2013) $10/year with free ID protection deal that Google Apps offered. Since then they’ve gone up to $12/year, but that’s not really an issue.

Categories
Computer Web

Finally! An internal DNS server that works (for me)!

So it’s been much too long since I wanted to do this, but thankfully, I have finally discovered the solution for which I can serve up my own DNS server for internal LAN things, but still have an external host that administers my public website!

My scenario and quandry was this:

Categories
Programming Web

…….from previous

Oh..and for those of you who still think it’s boring, I don’t like to rush these things. I like to see if they look good and what I want to change before I go changing everything there is to change. So just be patient.

Categories
Programming Web

Design

Merry Christmas! Almost..

Per request for a channel design switch, I’ve done a bit of CSS editing with borders and background images and transparencies. Enjoy!!

Categories
Programming Web

Wasted Space Now Reclaimed

So I’m looking at the page there..probably the one you’re looking at right now, and I noticed that there was a big blank space to the left of everything. “Well,” I thought, “How can I get the text to stretch that far?” Then I remembered the Edit HTML link in the Layout tab.

Went into the Outer Wrapper of the CSS section and changed the width attribute in the #outer-wrapper from 660px to 860px. Then I changed the width in #main-wrapper from 410px to 610px. There. Now the text shifts over into that blank spot (due to the outer-wrapper) and stretches across to hit the sidebar (due to main-wrapper). I feel so smart now.