Added: 2 years ago
From: phpacademy
Views: 6,980
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:
see all

All Comments (19)

Sign In or Sign Up now to post a comment!
  • Hello!

    THX for all tut, I've learnd lots of You, but now I'm getting an error. It says Deprecated: Function ereg() is deprecated. I really don't understand. Can anybody help me???? 

  • @pocak87

    Replace ereg function with: strstr($file, "sess")

  • Baabai?

    What the feck was that about? XD

    Anyway, I tried this tut, did EVERYTHING you told me to, and the error I'm getting is a loop of ereg is deprecated. What can I do to solve this issue?

  • you rock alex! i wish you become a millionaire.

  • 496 people on my site... i don't think so...

  • Dosn't work to well when u have 12,000 past five mins.....Causes my server load to jump.

  • I get:

    Warning: readdir(): supplied argument is not a valid Directory resource

    For the while-loop.. Any way to fix this?

  • Is there a way to make this working with another website without PHP..

    I mean i have a website with PHP, but i want to count the online users from the non php website and they must be shown in the PHP one :D

    i'm totally confused :D

  • you'll have to use PHP to store sessions, and to echo them out into a variable.

    thankfully, you can incorporate PHP w/HTML

  • you are genius

  • Nice tutorial. It's working for me in the sense that it's counting the amount of sessions, but my folder is not deleting sessions when browser is closed. Any ideas? thanks.

  • At all? It should do, sometimes takes a while. Although I know how to write this code, I'm not sure of the workings behind it so maybe someone else would be able to help, try the forums if not!

  • Well it's showing 117 ppl online and that couldn't be true cos nobody knows that site yet. But... it could be that my other site is hosted with the same company... the session files may be stored in the same folder. Which might be annoying :/

  • anyway.. if I figure it out, I'll let you know! Thanks a lot for the tutorial(s)... They are very helpful!

  • @phpacademy Yup, Alex, I just checked my TMP folder and there are 38 session files online. It says the same on my PHP script.

  • I think you need this: ini_set("session.cookie_lifeti­me", 0);

    Put it before session_start()! With this line, the user's session will be deleted when the browser closes.

  • I love your tutorials. and there very helpfull.

    Hope you bring us manny more tutorials.

    Good luck to you.

  • you rock rock rock! thanks again!

  • You're totally welcome!

  • Thanks dude.

Loading...
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more