URL: http://www.divineshadowsonline.com
Browser: FF
For some reason the API just keeps printing out a C when trying to call forum information. Was something changed in how the array is suppos to be formaed cause this is what i currently have:
Code:
- <?php
- $users_online = $vforums_api -> request("api/info/online/1/stats/0");
- echo "Total Players: " . $users_online['total_members'];
- ?>
Give it a try now. I recently updated some of the server file structure and thought I had updated all of the API files to reflect this. Apparently I missed one of the functions used by this API module. You can always check exactly what is being returned by doing a print_r() on the array. eg.
print_r($users_online);
OK i printed all of the major arrays and i can't find the array with the "total_members" in it. Its not in $users_online anymore, or at least it doesn't come up when calling its array.
Hi Dwight,
The API request you are doing there specifies the "stats" parameter as "0" (ie. false) therefore it doesn't fetch that information and only returns information about the current users online.
Code:
- <?php
- $users_online = $vforums_api -> request("api/info/online/1/stats/1");
- echo "Total Players: " . $users_online['total_members'];
- ?>
oh oops i forgot to change the 0. Ok thank you.
Edit: after the C vanished i now can't print the array and nothing in the user online is working, but yet the login checking system is still working.
I found out that for some reason you can't have Online functions and forum stat functions active at the same time, even if you split them in different php calls, the first call is what is activated.