Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

4
  • Why not try file_get_contents which returns a string representation of your HTML file. Also, are you using a REGEX to scan the string (your html) for the pattern? <b>111 players online</b> ? Commented Sep 16, 2015 at 13:21
  • What are the contents of the variable $content ? also, do you need to really use CURLOPT_BINARYTRANSFER ? I would think this setting is not necessary. Commented Sep 16, 2015 at 13:24
  • because fopen() is disabled on my webhost (there pretty strict and are overly cautious) as for REGEX im not entirely sure on how I would scan for the string when the number "111" is constantly changing ? Commented Sep 16, 2015 at 13:28
  • You would scan for text between the <b> tags, but in the answer below the method getElementsByTagName should do the trick. I upvoted the answer from @hellsgate because I LEARNED something today! Awesome. Commented Sep 16, 2015 at 13:43