kuddel I must say GREAT JOB MAN xD my crazyness will became to me another day 
I supose that the problem was at the end of line but I wasn't know how to resolve... another time THANKS a lot
If I have some time I will make a tutorial about working with this from PHP and for the people who wants to make their own "spacelines" like simnasa I'll explain how get data from their vessels directly from their webs. Represent graphics or whatever they want.
Thanks last time xD
And thats of course another way to make the same thing:
(To put code with the dollars on good position just turn off the "Automatically embed media" and "Automatically parse links in text" checkbox's)
Greetings to all!!
-----Posted Added-----
I've made a PHP Class using what i've learned to easy use sockets:
Simple to use but documentation incomming.
I supose that the problem was at the end of line but I wasn't know how to resolve... another time THANKS a lot
If I have some time I will make a tutorial about working with this from PHP and for the people who wants to make their own "spacelines" like simnasa I'll explain how get data from their vessels directly from their webs. Represent graphics or whatever they want.
Thanks last time xD
And thats of course another way to make the same thing:
PHP:
<?php
$socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
socket_connect($socket, '127.0.0.1', '37777');
$entry = "FOCUS:Name\r\n";
socket_write($socket, $entry, strlen($entry));
echo socket_read($socket,1024);
socket_close($socket);
?>
Greetings to all!!
-----Posted Added-----
I've made a PHP Class using what i've learned to easy use sockets:
PHP:
<?php
class OrbConnect
{
var $socket;
function __construct($ip = '127.0.0.1', $port = 37777, $timeout = 30)
{
if (!$this->socket = @fsockopen("tcp://$ip",$port, $errno, $errstr, $timeout))
trigger_error('Error on connect ($errno)', E_USER_ERROR);
}
function operation($param, $result_only = true)
{
if(!fwrite($this->socket, $param."\r\n"))
trigger_error('Can\'t send data to OrbConnect', E_USER_ERROR);
if(!$data = fgets($this->socket))
trigger_error('Can\'t retrieve data from OrbConnect', E_USER_ERROR);
if($result_only == true)
{
$array = split('=',$data);
$data = $array[1];
}
$data = trim($data);
if($data == '')
trigger_error('Maybe there are no server there or the data is NULL', E_USER_NOTICE);
return $data;
}
function __destruct()
{
fclose($this->socket);
}
}
$OrbConnect = new OrbConnect();
echo $OrbConnect->operation('FOCUS:Name');
echo $OrbConnect->operation('ORB:GBodyCount');
echo $OrbConnect->operation('ORB:SimMJD');
unset($OrbConnect);
?>