Jump to content

script help with apc_store...


allanballan27

Recommended Posts

Hello!

 

I havn't used php until 2 days ago. Im currently in a javascript class where im trying to make a silly multiplayer game that use ajax to communicate... I have gotten some simple script to work but when i try to use apc_store it does not work =(. It does not return anything... Is there a way to check if apc is available? Is there a simple way to turn on apc_ on the server by a php command? It is not my server, i have only access to my account.

 

<?php

$bar = 'BAR';

apc_store('foo', $bar);

echo apc_fetch('foo');

?>

 

If someone would be kind enough to help me with this? And if there is someone out there with some extra christmas-spirit, what i have on my wish list is a script that can handle 2 different clients and when they poll the server they should recieve the same string.

 

client1 sends this to the server -> "client1 game string"

client2 sends this to the server -> "client2 game string"

 

server contains "client1 game string, client2 game string"

 

Oh, and this has to work in real-time... i timed a script i had and it tock aboud 50 ms to send and recieve which is ok.

 

Cheers and a merry Christmas!

 

// Peter

 

Link to comment
https://forums.phpfreaks.com/topic/222574-script-help-with-apc_store/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.