Hi Mathew,
Must be the language thing. Sorry about that!
Okay.
So your webhosting company allows you to write files with php. That is a good thing.
The following is far from a nice solution but hopefully it
gets the point across:
let us assume the script is called writelines.php
and can be accessed in a browser using:
http://mywebhosting.com/~mathew/writelines.php?line=hello
<?php
$line=$_GET['line'];
$outputfile="chatlines.php";
copy("chatlines.php", "temp.php" );
$maxread=filesize("temp.php");
if (!($fout=fopen($outputfile,"w")))
die ("Cannot create output file.");
if (!($fp=fopen("temp.php","r")))
die ("Cannot open temporary file.");
do {
$data = fgets($fp,$maxread);
fwrite($fout,$data);
}while ((ftell($fp) < $maxread));
fwrite($fout,"<?php\necho(\"".$line."
\");?>");
fclose($fp);
fclose($fout);
?>
Basicly what it does is to create another php script
that you can access later to get the lines back.
I complete agree that this can be done far better and
you can use it to make your little database with the files. You mentioned php and therefore I created the
output completely in php
My message regarding the execute() method still can be applied to access these php scripts (writelines.php and chatlines.php).
Maybe you can make it into one php function that
returns some usefull coordinates which you can
read using the inputLine string in the method I provided
you with.
You propably won’t get a great speed using http calls
but they should will work across proxies and stuff like that which UDP has a greater problem with.
And since you are looking for a turnbased game it propably will be fast enough.
Regards from
ME