troubleshooting Question

Pulling Online Users

Avatar of Nathan Riley
Nathan RileyFlag for United States of America asked on
PHPWeb Development
2 Comments1 Solution155 ViewsLast Modified:
This is a continuation from this question: https://www.experts-exchange.com/Programming/Languages/Scripting/PHP/Q_28502915.html

I've pulled the total members and total posts successfully but unable to get the current members online.

Here is the current code, but returns nothing:
//Get current stats from SCB
$page = file_get_contents("http://forums.starcitizenbase.com");
preg_match_all("/<span class='value'>([\d,]*)<\/span>/", $page, $match);
//var_dump($match);
$total_post = $match[0][0];
$total_member = $match[0][1];
$total_online = preg_match_all("/<h4 class='statistics_head clearfix'>([\d,]*)<\/h4>/", $page, $match);
echo 'total online: '.$total_online;
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 2 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros