Page 1 of 1
Tracking clicks on AOL Instant Messenger
Posted: Fri Apr 18, 2003 11:28 pm
by Girard747
Hey, I'm making a little subprofile thing for myself because the aim thing is so limited, and i was wondering how i would go about making something to output the user's name to a file, and if they have visited more then once, it would put it in ()'s, like:
User (5)
User2 (2)
User3
ect..
but then i can include it into my other files.. im fairly new to php so im kinda a newb

Posted: Sat Apr 19, 2003 6:19 am
by volka
can you explain it in more detail?
Especially suited for people unfamiliar with AOL instant messenger.
Posted: Sat Apr 19, 2003 11:54 am
by Girard747
well, you can put links in your profile, and you can put %n, which is replaced with their screen name, no matter where you put it, so if i put
http:///www.site.com/aim.php?name=%n
because my screen name is Girard747, if i looked at the profile and saw that link, it would look like
http:///www.site.com/aim.php?name=Girard747
so i just need a script that can record the variable in name=* to a text or html file, without making duplicates.... i have a script that logs the name, but it makes duplicates instead of Name (times viewed)
Code: Select all
<?php
$TextFile = "visited.html";
$Body = "$_REQUEST[name]<br>";
$Body .= file_get_contents($TextFile);
if ($FP = fopen($TextFile, "w")){
fwrite($FP, $Body);
fclose($FP);
}
?>
and i just put that into the index.php so it will log it when anyone clicks on my profile....
http://68.43.48.51/profile/index.php?name=PHPForum
the people that have visited it are at
http://68.43.48.51/profile/visited.html
Posted: Sun Apr 20, 2003 10:37 pm
by Girard747
no one?
