Viewing posts tagged with minecraft

Minecraft Skin Preview via PHP

I've expanded on my Minecraft Avatar script I built a while back so that you can now display a skin preview for a given username, like so:

Minecraft Skin Preview

It's as easy as this to use:

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

Just like the facial avatar, this script grabs their skin from the Minecraft server, and then creates the 4 different views, including facial accessories such as hats or glasses. 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.

Check out the code on Github

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.

Check out the code on Github