Author Topic: Writing out players online to website  (Read 262 times)

sk8rdude461

  • New Member
  • *
  • Posts: 4
  • Karma: 0
    • View Profile
Writing out players online to website
« on: January 07, 2012, 10:40:42 PM »
I'm having a problem getting this to work on my website:
count(file("http://www.everlastpk.com/vps/players.txt"))

Yes, everlastpk is my website. I need it to write out how many players are online on  my game

jSherz

  • Expert PHP Helper
  • Senior Member
  • *****
  • Posts: 409
  • Karma: 4
    • View Profile
    • jSherz.com
Re: Writing out players online to website
« Reply #1 on: January 08, 2012, 06:59:20 AM »
Your players.txt file appears to be blank. This may be why it doesn't work.
Looking for PHP tutorials? View mine. Please use code or PHP tags in your posts.

sk8rdude461

  • New Member
  • *
  • Posts: 4
  • Karma: 0
    • View Profile
Re: Writing out players online to website
« Reply #2 on: January 09, 2012, 07:51:26 AM »
Your players.txt file appears to be blank. This may be why it doesn't work.
It is supposed to be blank. it adds/deletes players as they log in or out.
I just need to know how to make it write out onto the website

jSherz

  • Expert PHP Helper
  • Senior Member
  • *****
  • Posts: 409
  • Karma: 4
    • View Profile
    • jSherz.com
Re: Writing out players online to website
« Reply #3 on: January 09, 2012, 12:04:43 PM »
When you write to the file, which character(s) do you use for new lines? Could you post the code?
Looking for PHP tutorials? View mine. Please use code or PHP tags in your posts.