Viewing posts tagged with php

Minecraft Avatar via PHP

Here's a little something I built for fun a while back, when I was more active on Minecraft. I wanted a real simple way to generate a user's Minecraft avatar from their skin, and be able to display at any size.

Minecraft Avatar

It's as easy as this to use:

<img src='face.php?u={username}&s={size}' />

What the script does is grabs their skin from the Minecraft server, copies the face and facial accessories only and merges them into an 8 x 8 image, then resizes to the specified size. If the username does not exist, then it uses the default skin, which is stored in a base64 encoded variable to save an extra cURL request.

View the code on Github

23-Feb-2012 at 4:21pm

Xbox Last Seen Widget

Xbox Last Seen

Today I spent a little bit of time creating a tiny XBOX widget. It's a shame the XBOX Community Developer Program has taken so long for me to gain access to, so instead all the data is scraped from http://gamercard.xbox.com/en-US/rentedsmile.card.

Usually I don't tend to rely on scraping to get my data, but since I have no access to their API I had no choice really. Also, the gamercard has so much hidden information, it's almost as if they expect you to scrape it.

View the code on Github

05-Jul-2011 at 5:24pm