Noticed something looking through AWStats this afternoon. Traffic was coming from 146.0.74.234, an IP address in the Netherlands owned by a Russian. Sure, there will always…
Noticed something looking through AWStats this afternoon. Traffic was coming from 146.0.74.234, an IP address in the Netherlands owned by a Russian. Sure, there will always…
Needed a quick way to sort on version numbers, and PHP has a usort function that makes it pretty easy. You’ll need an array to…
Can’t take credit for all of this, but I also don’t remember where the code that I started with came from.
days_ago is a function that will take two dates and return a more human friendly version of dates. So if you pass today’s date and yesterday’s date it will return “1 day ago.”
A handy little function for your bag of tricks. This PHP function will return a max number of words out of a string, or the…
I’ve been using a PHP class in a project that pulls a URL and then caches the result so it doesn’t have to get loaded…
Needed a bit of an update on a font site I threw up a few years ago. Specifically I wanted to put a script together to tweet a random font each day. Should have been easy since I already had a script that tweeted new fonts, although it’s been a bit behind since I haven’t been updating the site like I needed.
Realized that the old script wasn’t working though since Twitter switched to OAuth and the class my old script was using didn’t use OAuth.
Came across this post which lead me to a Twitter OAuth class which made the whole process dead easy.
Quick snippet to reset all public instance variables inside a PHP class back to their original values. Can’t take credit for the code though. Found…
This is one of those issues I keep coming back to. I need a way to get the path of the current JavaScript file. Something…
Needed a quick way to go through and trim leading and trailing spaces off of a string array in PHP. I’ve used array_walk to do…
Had a client getting this error when trying to send emails last week and have now spent several hours on Google trying to find a…
Can't find what you're looking for? Try refining your search: