"; $creditsnew = $credits + $amount; echo "You have ".$creditsnew." credits now."; //Socket Part $socket = socket_create(AF_INET,SOCK_STREAM,SOL_TCP); $connection = socket_connect($socket,"127.0.0.1","90") or die("Can't find the host."); $packet = "XXCREDITS".$_SESSION['name']."".$creditsnew.""; $packet_len = strlen($packet); $packet_len = B64EncodeLenght($packet_len); socket_write($socket,"@".$packet_len."".$packet.""); //Socket Part }else{ echo "ERROR: Invalid Code"; } }else{ ?>
You have credits now.
Code: