It would be better to just write the numbers to a file, and use that in your other code.
PHP Code:
<?php
$password = $_REQUEST["pass"];
$key = "1234567890";
if ($password == $key) {
$file = "playercount.txt";
$file = fopen($file, 'w');
$player_count = $_GET['players'];
$rc_count = $_GET['rcplayers'];
fwrite($file, "$player_count $rc_count");
fclose($file);
echo "1";
} else {
echo "INVALID PASSWORD";
}
?>
then in your other code you can use:
PHP Code:
<?php
$data = file_get_contents("playercount.txt");
$toks = explode(" ", $data);
echo "Playercount: " . $toks[0];
echo "RCs: " . $toks[1];
?>
Re-writing your index every time is just a huge waste.