Categories
web

PHP Password Protection – Alternative to HTACCESS

I was trying to put some password protection on a single file the other day using an htaccess file, but was getting all sorts of weird server errors. So I did some searching and a little research, and I figured out a way to mimic htaccess password protection with php.

// Check if Username and password correct or ask for them
if(($_SERVER['PHP_AUTH_USER'] == "myusername") AND
($_SERVER['PHP_AUTH_PW'] == "mypassword"))
{ ?>
Protected Content Here
<?php } else {
// Ask for username and password
header("WWW-Authenticate: " ."Basic realm=\"Protected Area\"");
header("HTTP/1.0 401 Unauthorized");
// Show failure text after several failed attempts
echo "This area is protected by a valid username and password";
}
?>

Categories
web

Data Storage Rules

One of my colleagues sent me a link to a great page on Standford’s website defining their data storage rules. With so many processes moving from paper to online it’s important to make sure users know how and when they can collect certain information. I’ve experienced quite a few staff members in departments collecting social security numbers online using non-secure webpages and data being stored in non-encrypted databases.

So pages like this are needed now more than ever, especially as we see more and more data breaches.

Categories
web

Javascript Snippets for JQuery Functions

Jquery makes it super easy to add functionality to your web app, and there are tons of examples all over the interwebs. But I found this great website that gives you some easy straight-up Javascript alternatives:

http://youmightnotneedjquery.com/

It’s a great idea not to include JQuery as a dependency if you don’t have to (but apparently it’s not stopping many web devs since over half of all websites use JQuery).

Categories
web

Becoming a “Real Programmer” is more than just writing code

Many students come out of college as great programmers – but that doesn’t mean they have all the skills they need. When I look for student workers for our office, I ask our School of Business for Management Information Systems students. Unlike Computer Science or Technology majors, MIS majors are required to take the business core courses as well as their programming/networking courses. This creates a more-rounded programmer with skills like:

  • Gather and analyze requirements when they aren’t directly given to you.
  • Design and analyze architecture with near endless possibilities.
  • Create test plans and act on them to evaluate and improve the quality of a system.
  • Work collaboratively on a team of people with different backgrounds and experience levels.
  • Estimate and plan work even if you don’t know exactly what to build.
  • Communicate effectively with stakeholders who have different needs that don’t necessarily align.
  • Negotiate schedule, budget, quality, and features without disappointing stakeholders.

Read more here:

http://arstechnica.com/information-technology/2013/12/whats-the-difference-between-college-level-and-corporate-programming/

Categories
web

Web Fonts – Don’t Leave Home Without Them

There is no easier way to instantly class-up your website then web fonts. I feel like any site that isn’t using a web font service is behind the times. The standard web fonts just look so old and blah.

Adobe bought typekit a few years ago, and now they have over 500 fonts available for free! So you’ve got no excuse not to use new web fonts

https://edgewebfonts.adobe.com/

http://www.google.com/fonts

 

Categories
web

Real Favicon Generator

This is great to see that someone finally took the time to update favicon generators. Favicons have really evolved in the past couple years with different devices utilizing them. I think it’s getting a bit ridiculous that to fully utilize favicons for all the devices these days you have to have about 10 images (thus adding 10 lines of code to your pages). But, so is the way of progress.

http://realfavicongenerator.net/

Categories
web

Web Performance

These days it seems like performance is an after though – but it really shouldn’t be. If a page takes longer than a second to load, most users will start looking the other way.

Great article on the little things you can do to make your site load a lot faster:

http://coding.smashingmagazine.com/2013/01/22/css-performance-debugging-naming-conventions/

Categories
Blog web

Web Advent

Even though I’ve only been in the web community since about 2002, there has been a huge growth in the community. There are so many forums, blogs and online magazines available – and sharing knowledge and experiences has become a huge piece of what makes working on the web awesome.

One series that I’ve been reading for years is Web Advent (formerly known as PHP Advent). The series features an article written by a guest each day about a different topic that is web development related. I learned a ton last year, and the 2 posts this year are great. Do yourself a favor and read it daily this month!

http://webadvent.org/2012