|
30 | 30 | if ($DEBUG) var_dump($donor_object);
|
31 | 31 |
|
32 | 32 | $team_data = file_get_contents("https://api.foldingathome.org/team/".$_GET["team"], false, stream_context_create($arr_context_options)) or die("api failed");
|
33 |
| -$team_object = json_decode($donor_data, true); |
| 33 | +$team_object = json_decode($team_data, true); |
34 | 34 | if ($DEBUG) var_dump($team_object);
|
35 | 35 |
|
36 | 36 | // Load canvas
|
|
58 | 58 | imagettftext($canvas, $text_size, 0, 90, 82, $color, $text_fonts, $team_object["score"]); // score
|
59 | 59 |
|
60 | 60 | // For donor
|
61 |
| -imagettftext($canvas, $text_size, 0, 280, 13, $color, $text_fonts, $team_object["name"]); // name |
62 |
| -imagettftext($canvas, $text_size, 0, 290, 32, $color, $text_fonts, $team_object["rank"]); // rank |
63 |
| -imagettftext($canvas, $text_size, 0, 300, 50, $color, $text_fonts, $team_object["wus"]); // wus |
64 |
| -imagettftext($canvas, $text_size, 0, 280, 68, $color, $text_fonts, $team_object["score"]); // score |
65 |
| -imagettftext($canvas, $text_size, 0, 310, 82, $color, $text_fonts, $team_object["last"]); // last done |
| 61 | +imagettftext($canvas, $text_size, 0, 280, 13, $color, $text_fonts, $donor_object["name"]); // name |
| 62 | +imagettftext($canvas, $text_size, 0, 290, 32, $color, $text_fonts, $donor_object["rank"]); // rank |
| 63 | +imagettftext($canvas, $text_size, 0, 300, 50, $color, $text_fonts, $donor_object["wus"]); // wus |
| 64 | +imagettftext($canvas, $text_size, 0, 280, 68, $color, $text_fonts, $donor_object["score"]); // score |
| 65 | +imagettftext($canvas, $text_size, 0, 310, 82, $color, $text_fonts, $donor_object["last"]); // last done |
66 | 66 |
|
67 | 67 | if (!$DEBUG) header("content-type:image/png");
|
68 | 68 | imagepng($canvas);
|
|
0 commit comments