Browsing articles from "June, 2013"
Jun
22
2013

Retrieving Facebook Open Graph Data with PHP

Ever wonder, “Huh, I have a company page on facebook, but DAMN it’s lame to have to login to se the stats”?  I did, and as always- let’s grab some data with PHP! CODE! At the core of nearly anything you want to do with the facebook open graph is this url: https://graph.facebook.com/(username or id) And really, this doesn’t get a whole lot longer for the basics, we just need to use file_get_contents and json_decode […]

Jun
20
2013

Javascript and CSS Minification Class- MagicMin

A long long time ago, I wrote about using PHP to merge and minify javascript and CSS.  And it sucked!  It forcefully recreated the files each and every time the page was loaded, failed to compress or minify javascript files properly (resulting in some super duper errors), and overall was lame. It was however, short, so at least it had that going for it, which my actually awesome new class “MagicMin” does not have (it […]

Jun
17
2013

Getting started with PHP Functions

As I’m sure anyone who has visited this site more than a single time knows, I love php functions!  They make repeated processes and actions a breeze to initiate and take effect without having to copy-paste the same block of code into 25 different pages.  Then g-d forbid you should need to make a change to how it operates, or even worse- it’s just generally terrible and needs a full do-over! The day I discovered […]

Jun
14
2013

Getting Started with PHP: Part 3: Structure and variable existence

And here we are on part 3 of “Getting Started with PHP”! Today we have… Using effective website structure to make your life easier Overview of PHP isset and empty commands Using PHP to do your heavy lifting (using variables) Overview of PHP Isset && Empty Commands Within PHP, it is important to determine if our variables ‘actually’ exist, and/or are specified in any number of formats. For example: $variable = NULL; echo $variable; Will […]

Jun
12
2013

Getting Started with PHP: Part 2

Continuing the tutorial series on getting started with PHP (see “Getting Started with PHP” for the last batch), today I’ll provide some information on… Including external files Assigning PHP variables and constants Overview of variable and constant usage Including External Files PHP allows us to include external files that allow us to decrease the amount of redundant/repeated code used, as well as a security measure for important files such as files containing database connection details, […]

Jun
10
2013

Getting Started with PHP

I figured that since I spend most of my time buried DEEP in complex php functions, classes, and tips, it may be helpful to provide some background on what the hell you’re actually supposed to do if you have no idea! That being said, I’m going to begin adding some more introductory content that will hopefully provide some insight and tips on where to get started, so that you can more effectively work with more […]

Jun
10
2013

Structurer: Review

I’ll give you a hint.  It’s [insert obscenity here] awesome, and this is a review of the Nettuts app “Structurer” (link). Earlier today, I was setting up my 1,000,000th website, and thought, “HOLY CRAP.  This is getting redundant.”. When you work on as many sites as I do, or even if you just have to copy paste your files all the time, the hour or so it takes to load up all this stuff actually does pile […]

Jun
8
2013

Awesome Email open tracking with PHP and MySQL

Sometime last year, I wrote about super awesome email open tracking using PHP and MySQL, and I’ve since ALSO updated that one to be EVEN MORE SUPER AWESOME! Tracking email open rates is both very valuable, and very useful, particularly if you run a service where statistics are important, or in scenarios where more detailed information on users (namely their participation with site content outside the website is crucial). That being said, a couple things […]

Jun
7
2013

Updated MySQLi Database Class

Since I posted my mysqli database class originally on February 18th, I’ve gotten some great feedback, and A LOT of downloads, which is amazing! As a side note, I recommend always grabbing this class from the github repo at https://github.com/bennettstone/simple-mysqli I’ve also been using my own class on a large number of websites, and through the course of normal usage, and user feedback, I have made some changes… The error reporting has been enhanced to […]