
05-27-2007, 07:09 PM
|
|
The Cat
|
 |
Join Date: Jan 2007
Location: Missouri, USA
Posts: 4,240
|
|
requesthttp & PHP help
|
I am trying to do a "Live Stats" section on Ol' Wests new site.
under actionPlayeronline on the Control-NPC I wrote:
requesthttp("olwest.awardspace.com", 80, "index.php?do=stats&pcount=" @ allplayerscount);
and on the stats page I wrote:
<?PHP
if($_GET['pcount'] > 0){
$content = $_GET['pcount'];
$fp = fopen("./stats.txt","wb");
fwrite($fp,$content);
fclose($fp);
}
$display = fopen("./stats.txt","r");
$line = fgets($display);
echo"There are currently ". $line ." people online.";
?>
For some reason the request HTTP isn't working on my server, is it disabled? I spoke with Björn about how he did it on his Graal Kingdoms Lib site, and he said it doesn't work anymore but he's not sure why. Any input on this? |
__________________
“Shoot for the moon. Even if you miss, you'll land among the stars.”
|
|
|
|