December 2011
2 posts
One guy thought he was invisible, the other thought he could fly. Both were...
4 tags
Replacing Placeholders in PHP
Ran across a neat little function in PHP for replacing multiple placeholder instances within a string. Here’s an example:
$string = "<strong>##title##</strong><p>##some_text##</p>";
Here’s the PHP:
echo strtr($string,
array(
'##title##' => "The Spice...",
'##some_text##' => "Will flow!!!"
)
);
Here’s the result: The Spice…...
November 2011
2 posts
4 tags
Converting Non-English Characters in PHP
In my previous post, Removing Non-English Characters in PHP, I provided a way to remove non-english characters, but I found another neat trick to convert these characters into a close ASCII equivalent.
Here’s the code:
function unaccent($string) {
if (strpos($string = htmlentities($string, ENT_QUOTES, 'UTF-8'), '&') !== false) {
$string =...
7 tags
Removing Non-English Characters in PHP
Why would you want to do this, you say?
Well, I found out the other day a payment processor we use (Authorize.net) at the company I work at doesn’t allow for non-english characters and in return, throws a cryptic error.
Here’s the error: E00003 - Invalid character in the given encoding. Line 15, position 54.
Here’s the trick: $str = preg_replace('/[^\00-\255]+/u', '',...
September 2009
2 posts
10 tags
Creating a forum/chat room hybrid system
I’ve been asked a few times so far to create a chat room for one of my sites. Now even though I think this is an interesting request, I find that chat rooms have become a thing of the past, which have been taken up by the older Internet crowd and (sadly) cyber-predators (no, not like the one Schwarzenegger fought).
I did some thinking and a friend of mine helped me come up with an idea to...
6 tags
August 2009
15 posts
7 tags
Parsing RSS feeds using SimpleXML
I’m was working with Last.fm’s API service to post user’s recent tracks on one of my sites. I wanted a lighter solution to using their REST Request method so I opted to use their RSS feeds instead. In the past I used either Magpie or SimplePie to parse the RSS for easy access, but I didn’t want the overhead of both these services so I did some research and found something...
4 tags
Pollacio.us is here!!
My newest edition has arrived….
Pollacio.us is a website with a simple concept. You create a survey, invite your friends to vote, and watch as the results come in. Democracy at it’s best, yea yea!!
Have you ever had to make plans with a group of friends and never know what to do? Pollacio.us has the tools to help you and your friends decide on what to do as a group.
The site has a...
7 tags
Converting ZIP to State Abbr. (using PHP) →
Cool “little” script for converting a 5 digit ZIP code to a 2 letter state abbreviation.
6 tags
7 tags
6 tags
4 tags
5 tags
8 tags
9 tags
8 tags
Posting checkbox values with PHP and jQuery
For some time I had trouble figuring out how to post checkbox results using jQuery’s $.post function after submitting a form. I searched many different sites finding pieces of the a solution that would fit my needs. Anyway here’s what I got:
1) Let’s create a simple form.
<form id="my_form" onsubmit="return processForm()">
1) <input type="checkbox"...
jQuery API →
…never code without it. Courtesy of Remy Sharp
5 tags
New site on the horizon...
I am almost proud to present my latest site.
I am very close to wrapping it up, but I think it will be another week of perfecting it and making sure all the screws are tightened.
Here are some screen captures for a teaser:
Login Form (Header)
Register Form
Survey Overview
Voting Booth
Putting The Mint Consortium on hold for a while...
In order to finished up another one of my grandiose website ideas The Mint Consortium will have to wait a little longer. I really think my new site idea is a good one. I don’t want to give anything about it until I get closer to finishing it.
July 2009
11 posts
5 tags
Updating your Jaiku status revisited
After failing miserably trying to find a way to successfully updating my Jaiku status externally, I decided to give up. It has seemed like I had tapped all the resources online describing how you do it, but I just couldn’t get it to work on my end. My first attempt was following Jaiku’s instructions in using OAuth to connect to the site, but I soon found out that the callback URL pass...
What No Way
mikekrisel:
Just finishing up the sweetest site known to man. http://www.what-noway.com
Joking, It’s just a hobby. A very fun and delicious hobby.
Indeed. Soon it will be ready to take on the world!
The Mint Consortium (coming soon...) →
A few years back the Mint Consortium was born out of 2 developers and a few tins of mints. The Mint Consortium grew with each passing week as a new tin was added. The Mint Consortium was built with the intent of creating a diversity of mints. It was only a matter of time until one of the co-founders started introducing bad tasting mints to the Consortium until it was no longer tolerable. He was...
Rating my Gravatar
Today I created an account for my online Gravatar and was faced with one of the most difficult decision this year.. rating my Gravatar. To be honest I was kind of thrown off by this concept, but I guess it makes sense since I’ve seen some pretty crude avatars as of recent.
I have a regular set of images I tend to use for an avatar on various sites I have an active account with. My favorite...
Guessables :: The Image Guessing Game →
I actually came up with this idea a few years ago, but didn’t have the motivation to go through with it until now.
The general idea came from Conan O’brian’s sketch “What in the World?” where he would show an extremely magnified image and then zoom out until the image was recognizable. I took the idea and ran with it a little bit and decided to make a game out of it....
Posting to Tumblr via API
If you can read this, then I successfully used Tumblr’s API to post a blog entry. Woot! Hurrah!
One Line Rhyme :: A Hip Hop Quote Community →
Created this back in April of 2008. It’s had a lot of activity lately and keeps growing. I used Google’s CSS Blueprint for the layout. I’m no designer, which it shows, but I think the site looks really nice. Also, I fell in love with jQuery at the time, so it’s packed with legacy jQuery code that needs re-factoring.
Personal Home Page →
Nothing special here. Just my v3 personal home page.