Skip to content

Instantly share code, notes, and snippets.

Avatar

Minikea Minikea

View GitHub Profile
@Minikea
Minikea / terraria-status.php
Created February 12, 2020 12:17
TShock (terraria) REST dynamic image generator in PHP
View terraria-status.php
<?php
ini_set("default_socket_timeout",2);
//--- variables ---
$ip = '127.0.0.1'; //actual IP of the REST tshock server
$port = '7878'; //port of rest server, not terraria server
$token = "xxx"; //token to generate in tshock, see documentation
$json = json_decode(file_get_contents('https://'.$ip.':'.$port.'/world/read?token='.$token), true);
if ($json['status'] == '200')
{
View keybase.md

Keybase proof

I hereby claim:

  • I am Minikea on github.
  • I am minikea (https://keybase.io/minikea) on keybase.
  • I have a public key whose fingerprint is 6E75 3863 5C0B 2C49 EFE1 97E7 1173 6B71 622F B442

To claim this, I am signing this object: