Pappnase - User online ?

Get help with installation and running phpwcms here. Please do not post bug reports or feature requests here.
Stim
Posts: 587
Joined: Mon 6. Jun 2005, 13:13

Pappnase - User online ?

Post by Stim »

Hi
How to create that online user stuff in phpwcms? http://www.phpwcms-docu.de

And can it be hidden someway?
User avatar
DeXXus
Posts: 2168
Joined: Fri 28. Nov 2003, 06:20
Location: USA - Florida

Post by DeXXus »

Pappnase

Post by Pappnase »

hehe

thats not my solution cos i need no db connection :-)

at the docu page it look this way :-)

in the root lies an file called. useronline.php

Code: Select all

<?php
   $daten = "besucher.txt";
   $time  = time();
   $ip    = getenv("REMOTE_ADDR");
   $ablaufzeit = $time - "300";
   $pruefung   = @file($daten);

   while (list ($line_num, $line) = @each ($pruefung)) {
      $zeiten = explode("&&",$line);
      if($zeiten[0] <= $ablaufzeit) {
         $fp = fopen( "$daten", "r" );
         $contents = fread($fp, filesize($daten));
         fclose($fp);
         $line=quotemeta($line);
         $string2 = "";
         $replace = ereg_replace($line, $string2, $contents);
         $fh=fopen($daten, "w");
         @flock($fp,2);
         fputs($fh, $replace);
         @flock($fp,3);
         fclose($fh);
      }
   }
   $ippruefung = @file($daten);
   while (list ($line_num, $line) = @each ($ippruefung)) {
      $ips = explode("&&",$line);
      if($ips[1] == $ip) {
         $fp = fopen( "$daten", "r" );
         $contents = fread($fp, filesize($daten));
         fclose($fp);
         $line=quotemeta($line);
         $string2 = "";
         $replace = ereg_replace($line, $string2, $contents);
         $fh=fopen($daten, "w");
         @flock($fp,2);
         fputs($fh, $replace);
         @flock($fp,3);
         fclose($fh);
      }
   }
   $fp = fopen("$daten", "a+");
   flock($fp,2);
   fputs ($fp, "$time&&$ip&&\n");
   flock($fp,3);
   fclose ($fp);
   $anzahldaten = file($daten);
   $anzahl = count($anzahldaten);
   echo $anzahl." User online";
?>
also create in root an file called besucher.txt this need chmod 777

And the script you call via the rep tag {PHP:useronline.php}
Stim
Posts: 587
Joined: Mon 6. Jun 2005, 13:13

Post by Stim »

Thanks Pappnase :lol:

I will try that today. Thanks to you to DeXXus, but I didn’t understand anything from that topic!! Maybe someone should separate instruktions from that code. :wink:
Pappnase

Post by Pappnase »

Stim wrote:Thanks Pappnase :lol:

I will try that today. Thanks to you to DeXXus, but I didn’t understand anything from that topic!! Maybe someone should separate instruktions from that code. :wink:
hello

the link dexxuss end creates an rep tag. but there you need also an db connection and need to create sme db tables for this user online script!
Stim
Posts: 587
Joined: Mon 6. Jun 2005, 13:13

Post by Stim »

Hi Pappnase,

I use your online stuff and its works nice :lol:

I removed that online user text, and just changed colour to hide that. It’s not good if it’s visible for many reason, and I think you should hide it you to. :lol:

Thanks again for your help
Quizmaster
Posts: 35
Joined: Fri 27. May 2005, 11:45

Post by Quizmaster »

Hey Pappnase,

Works okay for me ! 8)
Thanks for that... :wink:
Pappnase

Post by Pappnase »

Stim wrote:Hi Pappnase,

I use your online stuff and its works nice :lol:

I removed that online user text, and just changed colour to hide that. It’s not good if it’s visible for many reason, and I think you should hide it you to. :lol:

Thanks again for your help
hello

hmm wich reaseons did you have to make it not visible! and for what did you have the script included!? when you hide it ;-)
Stim
Posts: 587
Joined: Mon 6. Jun 2005, 13:13

Post by Stim »

There are many reasons to hide it. Example if you have few users on the site, other user can think this site is “shit” because there are no users here. :lol: But it depends on what kinds of site it is.

I didn’t understand your last questions, but I have hide my online in the footer with same colour as background.. When I won’t to see online user, I just double click on it. :lol: I also removed “User online” text so only numbers shows up when I double click.

If I get a 1000000000000000 user every day then there are no reasons to hide it anymore :lol:
jscholtysik

Post by jscholtysik »

Hi Stim,


that are strange reasons I also cannot understand...


Joachim
Stim
Posts: 587
Joined: Mon 6. Jun 2005, 13:13

Post by Stim »

No thats not strange reasons :lol:

It is almost same strange reasons with webcounter.

It is not good to use. Well, not visible anyway :lol:
Pappnase

Post by Pappnase »

hehe

i think the user itself decide whats good and what not. i don't think that this will cause on an online monitor how many users online.

and an public counter i think is nothing really needed script! cos it says nothing abut the quality of teh website !
Stim
Posts: 587
Joined: Mon 6. Jun 2005, 13:13

Post by Stim »

Hi Pappnase

Your site is good even if you hide online user or not :lol:

My site have lots off same content as many other there sites have many more users what i have to my site. Therefore its very important to me hide it right now :lol:
Last edited by Stim on Wed 19. Apr 2006, 10:49, edited 1 time in total.
Pappnase

Post by Pappnase »

hehe

thanks for the compliment :-)
ndm
Posts: 14
Joined: Thu 26. Jan 2006, 14:06
Location: Switzerland
Contact:

Post by ndm »

tnx leute.

klappt prima...

:wink:
keep vintage alive ! use windows !
Post Reply