Minotar - The Miner's Avatar

Discussion in 'Bukkit Tools' started by clone1018, Aug 18, 2011.

Thread Status:
Not open for further replies.
  1. Offline

    Fishfish0001

    You might be typing something in wrong? I'm not sure really.
     
  2. Offline

    TNTUP

    I dont think. I type (localIP)/minotar, the index.php exists, it says 404 error. Well. gotta give up, I installed cherokee web server, same result. Thanks for the help anyway ;)
     
  3. Offline

    lol768 Retired Staff

    The service doesn't seem to work for me. I simply get a blank page. using wget gives me a file with size of 0. Even from another computer it doesn't work. Wget:
    PHP:
    --2012-07-26 18:09:30--  https://minotar.net/avatar/lol768/100
    Resolving minotar.net (minotar.net)... 141.101.125.81141.101.126.812400:cb00:2048:1::8d65:7e51, ...
    Connecting to minotar.net (minotar.net)|141.101.125.81|:443... connected.
    HTTP request sentawaiting response... 200 OK
    Length
    unspecified [text/html]
    Saving to: `100'
     
        [ <=>                                                                                                                                                                                              ] 0          --.-K/s  in 0s     
     
    2012-07-26 18:09:30 (0.00 B/s) - 
    `100' saved [0]
     
  4. Offline

    Bertware

    There is something strange with it. To give you an example:
    I am using Minotar to show player faces in my GUI.
    However, all calls to minotar are using my webserver as a proxy. I wrote a proxy php script, because if I didn't use that script, I couldn't get the images.
     
  5. Offline

    Fishfish0001

    Its down atm.
     
  6. Offline

    Bertware

    HTTP request sent, awaiting response... 200 OK

    When he tested, the server was online.

    The script that I use:
    PHP:
    <?php
    $url 
    $_GET['url'];
     
    $allowed = array('jpg','gif','png');
    $pos strrpos($_GET['url'], ".");
    $str substr($_GET['url'],($pos 1));
     
    $ch curl_init();
    $timeout 0;
    curl_setopt ($chCURLOPT_URL$url);
    curl_setopt ($chCURLOPT_CONNECTTIMEOUT$timeout);
     
    // Getting binary data
    curl_setopt($chCURLOPT_RETURNTRANSFER1);
    curl_setopt($chCURLOPT_BINARYTRANSFER1);
     
    $image curl_exec($ch);
    curl_close($ch);
    // output to browser
    $im = @imagecreatefromstring($image);
     
    $tw = @imagesx($im);
    if(
    $tw){
        if(
    $str == 'jpg' || $str == 'jpeg')
            
    header("Content-type: image/jpeg");
        if(
    $str == 'gif')
            
    header("Content-type: image/gif");
        if(
    $str == 'png')
            
    header("Content-type: image/png");
        
    $th imagesy($im);
        
    $thumbWidth 200;
        if(
    $tw <= $thumbWidth){
            
    $thumbWidth $tw;
        }
        
    $thumbHeight $th * ($thumbWidth $tw);
        
    $thumbImg imagecreatetruecolor($thumbWidth$thumbHeight);
        if(
    $str == 'gif'){
            
    $colorTransparent imagecolortransparent($im);
            
    imagefill($thumbImg00$colorTransparent);
            
    imagecolortransparent($thumbImg$colorTransparent);
        }
        if(
    $str == 'png'){
            
    imagealphablending($thumbImgfalse);
            
    imagesavealpha($thumbImg,true);
            
    $transparent imagecolorallocatealpha($thumbImg255255255127);
            
    imagefilledrectangle($thumbImg00$thumbWidth$thumbHeight$transparent);
        }
        
    imagecopyresampled($thumbImg$im0000$thumbWidth$thumbHeight$tw$th);
     
     
        if(
    $str == 'jpg' || $str == 'jpeg'){
            
    imagejpeg($thumbImgNULL100);
        }
        if(
    $str == 'gif'){
            
    imagegif($thumbImg);
        }
        if(
    $str == 'png'){
            
    imagealphablending($thumbImg,TRUE);
            
    imagepng($thumbImgNULL9PNG_ALL_FILTERS);
        }
           
        
    imagedestroy($thumbImg);
    }
    ?> 
    usage: minotar.php?url=http://minotar.net/avatar/player_name_here/20.png"
    it just gets the image, and then it'll send you the image with the correct header etc.
     
  7. Offline

    lol768 Retired Staff

    Seems fixed now. Thanks
     
  8. Offline

    brenden

  9. Offline

    TNTUP

    Can someone tells me how to install on my own webserver? Can someone do a tutorial or explain it? The github misses something, the page wont load.
     
  10. Offline

    Fishfish0001

    I got tired of Minotar always returning 500 errors for images and being down or loading slowly, so I installed it on my server. That was one hell of a process, and I never want to do it again.

    I also had to modify some of the files as the way it works on Minotar doesn't work at all on my server, no idea why. Regardless, it is working flawlessly on my server, and is quite a bit faster since it is all internal requests.
     
  11. Offline

    Bertware

    where did you get the files? I want to host them myself too, but I can't find them...
     
  12. Offline

    Superkabii

  13. Offline

    McLuke500

    Why don't you just use PHP to get www.minecraft.net/skin/McLuke300.png and change the name
     
  14. Offline

    edocsyl

    Hi
    I just installed the Minotar Service on my server.
    If someone wanna relieve Minotar.net he can take the skin from http://skin.edocsyl.ch

    Simple Heads
    Code:
    <img src="http://skin.edocsyl.ch/a/clone1018">
    <img src="http://skin.edocsyl.ch/a/edocsyl/100">
    <img src="http://skin.edocsyl.ch/a/Fishfish0001/100.png">
    
    Avatar With Helm
    Code:
    <img src="http://skin.edocsyl.ch/h/xr_king28/100.png">
    
     
  15. Offline

    Superkabii

    There's a number of differences.

    That's the raw skin itself. Minotar provides a fast drawing of a enlarged entire player skin or head, with or without helmets.

    Not to mention that Minotar provides accurate case-insensitive skins.
     
    McLuke500 likes this.
  16. Offline

    McLuke500

    With your code does it load a new skin every request or does it save it on files for fast access if it does then I might use it for my own web server for forum avatars.
     
  17. Offline

    edocsyl

    Its the same code like Minotar.
    The pictures are stored in a folder.
     
  18. Offline

    TNTUP

    how'd you got yours working? Mine dosen't work. Can you help me to set it? I have the required files, but it dosent work >.<
     
  19. Offline

    edocsyl

    TNTUP
    Any errors?
    Did you activate the php imagick extension?
     
  20. Offline

    Bertware

    It won't work on my server...
    when I go to the subdomain that hosts the files, I get
    Parse error: syntax error, unexpected T_FUNCTION in [...]/minotar/index.php on line 6
    PHP:
    respond('/', function ($request$response) {
    I added klein.php and the WideImage lib as I saw they were needed, but the error is still there. Any ideas about this?
     
  21. Offline

    edocsyl

    Make sure your paht to klein.php is working..

    don't call the file like xxxxx.xxxxx.xx/index.php only like so xxxxx.xxxxx.xx/

    check your .htaccess file too, if you calling this not in the root direction, you need to edit this

    Code:
    RewriteRule . /index.php [L]
    PHP:
    require 'klein.php';
    include 
    'wideimage/lib/WideImage.php';
    include 
    'Minotar.php';
    if you get a error while calling the Imagick(); function, you need to install imagick extension
     
  22. Offline

    Bertware

    The only error I get is
    Parse error: syntax error, unexpected T_FUNCTION in [...]/minotar/index.php on line 6
    include 'wideimage/lib/WideImage.php'; is include 'wideimage/WideImage.php'; for me, but this is correct
    I put the same .htaccess in the subdomain root, so it should override the settings from the main .htaccess
    Though, I've changed the main .htaccess too, but still no luck.
    It seems like it won't accept the "response" function from the klein.php file...

    Edit:
    unexpected T_FUNCTION

    respond('/', function ($request, $response) {

    would it be the " function ($request, $response)" part?
     
  23. Offline

    edocsyl

    Try to run, this with chmod 777
    change permissions to 777 to all files
     
  24. Offline

    Bertware

    didn't work.
    Though, I found out something weird...
    even there is "error_reporting(0);" it shows the error.
    require("klein.php");
    if I change the name to a file that doesn't exist, it won't give an error about missing file or something. It won't show the error, also if I remove the "error_reporting(0);"
    Seems like something's wrong with my php

    edit:
    Not my php, but these scripts.
    edocsyl
    You got it working, so is it possible for you to send me your minotar folder?
    You could upload it somewhere (dropbox, or just zip it on your server) and send me the link over pm.

    thanks!
    still doesn't work however. I'm going to ask my host about any limitation or something like that, or if everything's enabled. Quite strange....
    Thanks for the help however!

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 18, 2016
  25. Offline

    TNTUP

    well, it shows me an 404 error, even the index.php is present! And what imagick? I never heard that.

    Edit: I google'd the imagick ext, looked in download, I already have it installed "Version: ImageMagick 6.6.0-4 2012-05-02 Q16"
     
  26. Offline

    Fishfish0001

    You should not have the WideImage files installed publicly. They are part of the Pear Package.

    That error you are getting is because klein.php either isn't there, or is being called wrong.

    Edit: And make sure you are on apache. .htaccess only works on Apache, not nginx.
     
  27. Offline

    TNTUP

    I use cherokee web server, the php is working. I tested the php info file. Uh, WideImage is linked in Minotar folder. I think its the github misses something. I have installed wideimage by pear, files are present. Why there's no tutorial about this? edocsyl Lucky you, yours works, mine isnt. Can you tell me the procedures how to set it up? Ugh sorry If I dont understanding it, I try what you say, no work.
     
  28. Offline

    edocsyl

    TNTUP Bertware

    How I set it up

    1. Upload the github conten from Minotar (Or the content from skin.rar) to the root direction from a sub domain.
    2. Upload klein.php and wideimage lib (if you use the content from skin.rar you can skip this).
    3. Set permissions to chmode 777 for all files and folders.
    4. Apache settings (enabled): mod_rewrite, mod_autoindex
    5. PHP settings (enabled): imagick module

    My Php Info
    http://skins.edocsyl.ch/phpinfo.php

    Download
    http://skins.edocsyl.ch/skin.rar
     
  29. Offline

    Bertware

    Hmmm, my hosting company only offers GD lib, but they can't enable imageick on my webserver :/
    It's probably that...
     
  30. Offline

    edocsyl

    without this lib it doesn't work
     
Thread Status:
Not open for further replies.

Share This Page