<?php
header('Content-Type: image/png');
$player_name = 'wide_load';
$width = 200;
$height = 200;
$cache_file = "cache/player_skins/faces/{$player_name}_{$width}x{$height}.png";
if (!file_exists($cache_file) || time() - filemtime($cache_file) > 86400){
$skin = imagecreatefromstring(file_get_contents("http://s3.amazonaws.com/MinecraftSkins/{$player_name}.png"));
$face = imagecreatetruecolor($width, $height);
imagecopyresized($face, $skin, 0, 0, 8, 8, $width, $height, 8, 8);
imagecopyresized($face, $skin, 0, 0, 40, 8, $width, $height, 8, 8);
imagepng($face, $cache_file);
}
readfile($cache_file);
?>
Category Forum
Modifications and Requests - 8Labels
None yet
Statistics
1 participant
Notifications
You are not receiving notifications from this thread.
Related Questions