Jason T. Stiles

Expert Web and Mobile Applications Developer

Count the Lines of Code in your Web Application with PHP

  • June 15th, 2011
Have you ever wanted to know how many lines of code your web application consists of? I have.  To find out, I created a recursive function in PHP to count the number of lines in files relating to my web application.  Since your entire web application is likely to reside under one directory (that's the assumption I use in this article), we can count the number of lines in each file, and disinclude any files that don't have the file extensions we're looking for.  For example, the sy... Read more.

How To Protect Your Site From XSS With PHP

  • June 8th, 2011
Cross-Site Scripting (XSS) is a type of attack where a hacker attempts to inject client-side scripting into a webpage that others are able to view.  The attack could be as simple as an annoying alert window or as sophisticated as stealing a logged in user's credentials (commonly saved in browser cookies).  With a user's credentials, a hacker could gain access to sensitive parts of your website or web application.  In this simple guide, I'll show you a few ways to protect your webs... Read more.

How To Submit a Form with jQuery and AJAX

  • June 1st, 2011
HTML forms make up a large part of the web. They are the primary method for retrieving input from users.  Typically, you fill out the form, click the submit button, and be redirected to a thank you page.  For web applications, this may not be ideal - you may not want the user to leave the page. In this article, I'll show you how to use jQuery's AJAX function to submit a form asynchronously to the server and avoid a redirect. A Simple Contact Form Here's an example of a simple contact... Read more.

How To Display Your Latest Tweets with PHP

  • May 19th, 2011
I recently wanted to display my latest tweets on my website since I am trying to use Twitter more regularly.  Until I was able to do this, I knew nothing about Twitter or its API's and I didn't really feel like researching it much either.  I wanted a quick solution and a simple google search lead me to Nick Heer's blog post Display Your Latest Tweet With PHP.  Nick cites that he pulled the code from Smashing Magazine, but Smashing Magazine actually got it from Ryan Barr at Sc... Read more.

Random Tips on Web Development

  • May 9th, 2011
Every once in a while, I'll be posting some tips on web development.  These are tips I may have gotten from the web or from my own experience, and they could be on anything related to web development.  So without further ado, here are the first tips of many to come! Tip #1: Using jQuery to "Check All" checkboxes in a list This is a handy tip I've incorporated in many of my projects.  If you have a list of checkboxes, it's nice to give the user the option of checking all the boxe... Read more.

Categories

Latest Posts

Chrome Developer Tools

December 10th, 2012

I just did a Lunch & Learn presentation on Chrome Developer tools last week and used the video and accompanying slides as... Read more.

Optimization is King

December 3rd, 2012

Thought I'd share this Google Docs presentation I created a while ago for a Lunch and Learn at the company I am currently wor... Read more.

New Project: OnTask

May 20th, 2012

Started development on a new Task Management Application this weekend - I have dubbed it "OnTask".  Catchy, right? My ob... Read more.