Jump to content
Science Forums

'Users Online' PHP script


TINNY

Recommended Posts

  • Replies 67
  • Created
  • Last Reply

Top Posters In This Topic

You should ask yourself which set of results are more likely to be correct. Fixing the data like that is not good. You better find out if a) the data is wrong or :) your way of getting the data is wrong.
more likely that the script is wrong than webalizer wrong.

 

Also ask yourself whether 3,000 visitors per day is correct or not. It sounds like a lot to me. It his a busy site? Hypography is not an extremely busy site but we have around 6,000-8,000 visitors per day on average.
It IS quite busy, at least i think it is... We had a total of 28.2GB of data transferred and 2.2 million hits in november. total pages amount to 10000. 3000 visists per day was right.

 

Do you get 1 or 2 distinct IP's per 10 minutes? That sounds more reasonable, depending on what site you are working on.
definitely more than that! anyway, do you have any idea where these IPs comes from: 80.58.19.107, wfp2.almaden.ibm.com, 65.54.188.147, popl-cache-7.server.ntli.net. and what's a referrer?

 

Comparing tracking scripts with log files is not easy. The log file contains every single hit, including images. So on average I'd say that one unique IP in the log file will average somewhere between 10-15 hits per page. And the log file also includes every single page they view...so the number you're looking for is more likely to be distinct ip / number of pages viewed.
the webalizer provides info on hits, visits, kbytes,files etc. so you can pick and choose which one to choose. of course, i compared it with visits.
Link to comment
Share on other sites

more likely that the script is wrong than webalizer wrong.

That really depends on how you interpret the data. No log stats product is correct (statistics are by definition not correct).

 

It IS quite busy, at least i think it is... We had a total of 28.2GB of data transferred and 2.2 million hits in november. total pages amount to 10000. 3000 visists per day was right.

I assume you meant 10,000 pages per day, then?

 

definitely more than that! anyway, do you have any idea where these IPs comes from: 80.58.19.107, wfp2.almaden.ibm.com, 65.54.188.147, popl-cache-7.server.ntli.net. and what's a referrer?

The two IP's are from Holland and Seattle (Microsoft) respectively. The others are not IP's.

 

the webalizer provides info on hits, visits, kbytes,files etc. so you can pick and choose which one to choose. of course, i compared it with visits.

Yes, the visits is the most interesting part.

Link to comment
Share on other sites

And a "referrer" is...

 

The URL of the web page from which a visitor came. The server's referrer log file will indicate this. If a visitor came directly from a search engine listing, the query used to find the page will usually be encoded in the referer URL, making it easy to see which keywords are bringing visitors. The referer information can also be accessed as document.referrer within JavaScript or via the HTTP_REFERER environment variable (accessible from scripting languages).
Link to comment
Share on other sites

Take a look at this script. It might give you a different approach. I'm not saying it is good, nor that it works (I have only looked at it, not tried it), but at least if this gives you different results then you know something is wrong with your script.

 

http://searchall.iwebland.com/index.php?action=detail&id=1063726531

Link to comment
Share on other sites

so this uses a text file instead of a database. what difference does that make, apart from possibly slowng down the page?

anyway, i'll try. maybe i should put both codes on the same page and compare.

that referrer thingy is absolutely cool! gotta check it out.

about the IP i gave, those four recorded the most visits. really strange to think what a dutchman would be doing at my website. or microsoft. and why is the other two not an IP? what causes that to be displayed?

I assume you meant 10,000 pages per day, then?
i meant that i have 10000 pages. not 10000 visits per day.

 

Hmm.. hei! you still did not tell me how to do the cookie script.

Link to comment
Share on other sites

i just tried the new script. so the technique was to keep refreshing the page so as to keep updated on who is online and who has exited. Well, it really looked silly - kept on refreshing - the page would flash every few seconds. and somehow, the numbers were not displayed.

but this is something different. using the <iframes> was a good idea.

Link to comment
Share on other sites

hmm... somehow firefox wont display the iframes. You can see the frame in IE although the numbers of users online cannot be observed.

 

upon opening the online.php page, i find this error:

Warning: fopen("online.txt", "w") - Permission denied in /home/mywebsite/web/online.php on line 25

 

Warning: Supplied argument is not a valid File-Handle resource in /home/mywebsite/web/online.php on line 26

 

Warning: Supplied argument is not a valid File-Handle resource in /home/mywebsite/web/online.php on line 27

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...