My website is based on wordpress and pages are cached.
Actually I display on the home page : the number of user online on chat.
It works but only if the wordpress cache is disabled. This is normal because I use server side code to display this information (so if the number of user change, i don't see the change).
I need to do the same but by client side in Javascript.
Here my server code
- Code: Select all
Code:
require_once dirname(__FILE__)."/../../../../src/pfcinfo.class.php";
$serverId = "website";
$chatinfo= new pfcInfo($serverId );
$users = $chatinfo->getOnlineNick(NULL,10);
return count($users);
How could i do this? Can I call something in pfcclient.js which could do this?
thank you for your help. I don't really know how to do!