is there a way to display how many users are online in the site in PHP without utilizing mysql?

Utilize a logfile

Instead of using MySQL database create a database file!

users.online.txt textfile:

87.58.110.25 1278694959
130.20.145.10 1278694920

Each row is a visitor.
First column is the visitor IP.
Second column is the last visitor activity.

Whenever the visitor visits a page, you update the time entry in your file.

Whenever a visitor queries for the number of users online, you iterate through all rows, and for every timestamp that is less than 3-5 minutes ago counts one up, and those that have been inactive for longer will be deleted from the file to save space.

It may sound advanced but it really isn't

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.