We help IT Professionals succeed at work.

Pulling Online Users

Nathan Riley
Nathan Riley asked
on
152 Views
Last Modified: 2014-08-22
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;
Comment
Watch Question

Most Valuable Expert 2011
Author of the Year 2014
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION
Nathan RileyFounder

Author

Commented:
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.