Visitors counter

If you have anything to say - or advice to give - on the creation or publishing of ManiaLinks, here is the place to do it!

Moderator: TM-Patrol

Post Reply
User avatar
apovtx
happy cruiser
happy cruiser
Posts: 154
Joined: 04 Dec 2008 16:06
Owned TM-games: TMUF,TMNF,TMN
Manialink(s): funteam
Location: Xanthi,Greece
Contact:

Visitors counter

Post by apovtx » 14 Apr 2009 18:35

Hi all! I want to put a visitors counter in my teams manialink funteamcolor>.
Anyone know how? :D
Also, is there any way to log in a database all the visitors?
Ex. When someone clicks on the "Enter the manialink" link, write his login in a database

Thanks in advance :thumbsup:
Last edited by apovtx on 15 Apr 2009 14:52, edited 1 time in total.
Do you wanna be a journalist?
Contact me with PM!
Image

User avatar
Wolf68k
speedy pilot
speedy pilot
Posts: 590
Joined: 23 Jan 2009 16:33
Owned TM-games: TMS, TMUF, TMNF
Location: Houston, Texas

Re: Visitors counter

Post by Wolf68k » 14 Apr 2009 23:10

I can't answer any of these but I would like to comment on them if that's ok.

I don't see anything wrong with a counter, tons of websites have them so why not. However something that logs people's names I think some people might have an issue with privacy. To them it would be 'it's none of your business that I came to your site or how many times' even if websites can track that anyway.
TM name: wolf68k
Display name: Wolf68k (the 8 is actually white ingame, kinda hard to do here)

User avatar
apovtx
happy cruiser
happy cruiser
Posts: 154
Joined: 04 Dec 2008 16:06
Owned TM-games: TMUF,TMNF,TMN
Manialink(s): funteam
Location: Xanthi,Greece
Contact:

Re: Visitors counter

Post by apovtx » 15 Apr 2009 06:20

Yes i know it but i would never show my visitors names. I want this "script" in order to show for examble who has buy a skin or who has donate. But the most important is the counter :thumbsup: :lovetm

Thanks :1
Do you wanna be a journalist?
Contact me with PM!
Image

jouko100
speedy pilot
speedy pilot
Posts: 375
Joined: 10 Mar 2007 09:33
Location: finland
Contact:

Re: Visitors counter

Post by jouko100 » 15 Apr 2009 17:17

only good working counter is ip counter

User avatar
apovtx
happy cruiser
happy cruiser
Posts: 154
Joined: 04 Dec 2008 16:06
Owned TM-games: TMUF,TMNF,TMN
Manialink(s): funteam
Location: Xanthi,Greece
Contact:

Re: Visitors counter

Post by apovtx » 15 Apr 2009 17:21

Where can i find it? :) Or a tutorial or any help :?: :thumbsup: :lovetm
Do you wanna be a journalist?
Contact me with PM!
Image

jouko100
speedy pilot
speedy pilot
Posts: 375
Joined: 10 Mar 2007 09:33
Location: finland
Contact:

Re: Visitors counter

Post by jouko100 » 18 Apr 2009 13:12

My ip counter.Shows ip hits and ip
COPY CODE AND SAVE IT BY NAME COUNTER.PHP

put same folder where is yours mainpage.xml.
make there empty 'uniquehits.txt file
add line in mainpage.xml and edit it
<include url="http://path to counter/counter.php"/>

edited 20,4,2009





Code: Select all

<frame>
<?php

// made  by JOU COUNTER.PHP

// CHMOD this file to 666
// If it doesn't work, try 777
$log = 'uniquehits.txt';


$IP = getenv (REMOTE_ADDR);
$add = true;
$hits = 0;

if (!file_exists ($log)) {
	echo "Error: $log does not exist.";
	exit;
}

$h = fopen ($log, 'r');
while (!feof ($h)) {
	$line = fgets ($h, 4096);
	$line = trim ($line);
	if ($line != '')
		$hits++;

	if ($line == $IP)
		$add = false;
}

fclose($h);

if ($add == true) {
	$h = fopen ($log, 'a');
	fwrite($h, "
$IP");
	fclose($h);
	$hits++;
}

?>
<?php



$hits;
$count;
$ip;
$ip = $_SERVER["REMOTE_ADDR"]; //snag users ip addres

echo '<label textsize="1"posn="40 -45 7"  halign="left" valign="center" text="$FFC$o'.$hits.'$z"/>';
echo '<label textsize="1"posn="50 -45 7"  halign="left" valign="center" text="$FFC$o'.$ip.'$z"/>';






?>







<label textsize="1"posn="34 -45 7"  halign="left" valign="center" text="$CCC$oIP hits:$z"/>
 
//ip
$ip;
$ip = $_SERVER["REMOTE_ADDR"]; //snag users ip addres


<label textsize="1"posn="47 -45 7"  halign="left" valign="center" text="$CCC$oIP:$z"/>
 

 
</frame>
Last edited by jouko100 on 20 Apr 2009 04:49, edited 6 times in total.

User avatar
apovtx
happy cruiser
happy cruiser
Posts: 154
Joined: 04 Dec 2008 16:06
Owned TM-games: TMUF,TMNF,TMN
Manialink(s): funteam
Location: Xanthi,Greece
Contact:

Re: Visitors counter

Post by apovtx » 18 Apr 2009 13:33

Thanks for the answer :D I finally managed to put a counter (not ip counter though) but i'll try it later this day!

Apovtx :thumbsup: :lovetm


*EDIT* Thank you. It works great!!!

:wink:
Do you wanna be a journalist?
Contact me with PM!
Image

User avatar
ЭΛ GAS〄SőŁのเē尺
sunday driver
sunday driver
Posts: 55
Joined: 17 Jul 2009 17:37
Owned TM-games: TMU, TMO, TMS ,TMNF
Manialink(s): elteam,or elt for the bored people :P:P

Re: Visitors counter

Post by ЭΛ GAS〄SőŁのเē尺 » 20 Jul 2009 20:33

jouko100 wrote: make there empty 'uniquehits.txt file
add line in mainpage.xml and edit it
<include url="http://path to counter/counter.php"/>

Can u explain me what do u mean with this? I dont understand it very well
Image
ЭΛTEAM SERVERS:
ЭΛ UNITED 80-100K
ЭΛ UNITED PRO 60-90K
ЭΛ CLASSICO 0-60K
ЭΛ MINI RPG 0-50K
ЭΛ PARANIA RPG 0-50k
ЭΛ PRIVE 0-50k (LOCKED)
Enjoy our servers and also visit our Site : http://elteam.ath.cx

jouko100
speedy pilot
speedy pilot
Posts: 375
Joined: 10 Mar 2007 09:33
Location: finland
Contact:

Re: Visitors counter

Post by jouko100 » 21 Jul 2009 04:18

<?php
echo '<manialink>';
echo '<type>default</type>';
echo '<timeout>0</timeout>';

echo '<include url="http://ur path/counter.php"/>';


or

<manialink>
<type>default</type>
<timeout>0</timeout>

<include url="http://ur path/counter.php"/>

User avatar
ЭΛ GAS〄SőŁのเē尺
sunday driver
sunday driver
Posts: 55
Joined: 17 Jul 2009 17:37
Owned TM-games: TMU, TMO, TMS ,TMNF
Manialink(s): elteam,or elt for the bored people :P:P

Re: Visitors counter

Post by ЭΛ GAS〄SőŁのเē尺 » 21 Jul 2009 09:37

Thx.it worked,but can u say me how to make for e.g Visitors 9
thx in advance
Image
ЭΛTEAM SERVERS:
ЭΛ UNITED 80-100K
ЭΛ UNITED PRO 60-90K
ЭΛ CLASSICO 0-60K
ЭΛ MINI RPG 0-50K
ЭΛ PARANIA RPG 0-50k
ЭΛ PRIVE 0-50k (LOCKED)
Enjoy our servers and also visit our Site : http://elteam.ath.cx

jouko100
speedy pilot
speedy pilot
Posts: 375
Joined: 10 Mar 2007 09:33
Location: finland
Contact:

Re: Visitors counter

Post by jouko100 » 22 Jul 2009 16:27

Can u explain me what do u mean with this? I dont understand it very well

User avatar
ЭΛ GAS〄SőŁのเē尺
sunday driver
sunday driver
Posts: 55
Joined: 17 Jul 2009 17:37
Owned TM-games: TMU, TMO, TMS ,TMNF
Manialink(s): elteam,or elt for the bored people :P:P

Re: Visitors counter

Post by ЭΛ GAS〄SőŁのเē尺 » 22 Jul 2009 20:46

No its ok i found it alone :) but thx anyway xD
Image
ЭΛTEAM SERVERS:
ЭΛ UNITED 80-100K
ЭΛ UNITED PRO 60-90K
ЭΛ CLASSICO 0-60K
ЭΛ MINI RPG 0-50K
ЭΛ PARANIA RPG 0-50k
ЭΛ PRIVE 0-50k (LOCKED)
Enjoy our servers and also visit our Site : http://elteam.ath.cx

Post Reply