Browsing articles tagged with "php - Reich Consulting"
Dec
8
2011

Subnet Calculator in 9 Lines of PHP

I’ve been spending a lot of time studying for my Microsoft 70-642 exam, an important part of which is subnetting.As an intellectual exercise I wrote a subnet calculator. Enjoy: 1 2 3 4 5 6 7 8 9 function subnet($hosts) { $bits = decbin($hosts) + 2; // Add 2 for Network ID and Broadcast $hostBits = strlen($bits); // find how many bits it takes to represent it $cidr = 32 – $hostBits; // Find slash-notation [...]

Jan
21
2011

Use a Frame-Busting Redirect To Authorize Facebook Applications

While developing a new Facebook application I stumbled upon a very common app development bug: redirecting users to authorize your app from within an Iframe-based Facebook application. This post explains how to easily solve the problem

Jan
13
2011

Making the PHP Curl Extension Work on Windows

Earlier tonight I was setting up some development tools on my new laptop and ran across a problem that I had never seen before.  When I began testing an application that uses the Facebook API (which depends on the CURL library), PHP insisted that the CURL extension was not loaded.  I checked and double-checked that my php.ini file was correct (it was) and that the rest of my extensions were loading (they were). Finally after [...]

Dec
15
2010

Removing Keys from an Array in PHP

Every wish PHP had a function like array_remove_keys() to delete one or more keys and their values from an array? This post shows you how to construct one using just a couple of lines of code.

Dec
12
2010

A Reponse to “Web Programming is Hard!”

A response to another developers blog which discusses the fact that WEB DEVELOPMENT IS HARD, or at least very different from desktop development.

Pages:12»