Jump to content

Getting text from a web page

- - - - -

  • Please log in to reply
2 replies to this topic

#1
Jrb

Jrb

    Learning Programmer

  • Members
  • PipPipPip
  • 49 posts
Hi guys,

I'm trying to get some text from a web page. It's the page for our Battlefield 3 servers, and I'm trying to write a simple script so I can have it on our website.


=rTr= DALLAS WAKE / OMAN / SHARQI / KARK HC - Server Browser - Battlelog / Battlefield 3

All I want to do is get the current number of players as seen on the page: Screenshot by Lightshot

Does anyone know how I can go about doing this? It seems like it should be fairly easy, and I feel pretty dumb about it.

#2
SoN9ne

SoN9ne

    Programmer

  • Members
  • PipPipPipPip
  • 129 posts
one way would be to use: file_get_contents
"Life would be so much easier if we only had the source code."

#3
t0asty

t0asty

    Newbie

  • Members
  • Pip
  • 7 posts
removed. Made error.

will update later tonight

Edited by t0asty, 12 January 2012 - 11:57 AM.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users