Page 1 of 1

log viewer screennames from AIM

Posted: Thu Oct 30, 2003 11:49 pm
by westdamron
I no basically nothing about PHP, but I was wondering if there is a way to create a link in an AIM profile, which would use the %n feature to log screennames once they visit the link. I would find it preferrable if the data could be stored in a txt file.

for example in my profile it might have a link to "www.site.com/page.php?name=%n" which would then translate to "www.site.com/page.php?name=friend1223" or whatever. I would then want the friend1223 part to be logged in the txt file for me or others to view.

as i mentioned before, i no basically nothing about PHP, and I dont even know if this would be possible or not...just a question.

Posted: Fri Oct 31, 2003 4:32 am
by m3mn0n
Yeah, it is possible.

I suggest storing to a database though. You can then save and edit more material faster and easier than flat text files.

This is a good project to kick-off your php learning. May I recommend a good book or exploring some online tutorial sites to learn the basics. Then explore the MySQL functions and database connection side of php, and from there you should easily know how to do what your asking.

Posted: Fri Oct 31, 2003 5:35 pm
by d3ad1ysp0rk
Even if you know nothing about PHP, your logic is good so far.

You'll find eventually though, even if you don't have enemies (friends think its funny too..), that you'll get bad things left for screen names

Most people copy the link from AIM by right clicking and copying the hyperlink, then they change the value in the URL to whatever they want.

I'm working on that problem now though, I'm thinking if it reads their browser as anything besides AIM (mozilla, IE, Netscape, etc..), then it won't add their link to the database/text file.

Thing is, PHP isnt very nice about it, except "get_browser();" which my host hasnt uncommented (in php.ini).. :(

I think just doing it in javascript may work though..

Posted: Fri Oct 31, 2003 6:11 pm
by Bennettman
If you do something like this, it won't work when the AIM SN has a space (or more than one) in. The AIM profile browser doesn't encode it to hex and it brings up an error when you click on the link. It CAN be fixed by some working with the Apache settings, which I'm pretty sure is what AIM profile sites do.

Posted: Fri Oct 31, 2003 8:38 pm
by d3ad1ysp0rk
"Subprofile"
"You can't have spaces in your screen name to access it."

:D


http://www.404-design.net/subinfo.php?sn=%n

^saves sn to text file, then includes it to the bottom

but look at the screen names (after the first 10 or so legit ones, it's just a bunch of stupid crap)

Posted: Sat Nov 01, 2003 1:13 am
by westdamron
Im not as much worried about people spamming me or typing in fake sn's, but if theres a way to get around those too that would be cool. thanks a lot for the help.

Posted: Sat Nov 01, 2003 9:56 am
by d3ad1ysp0rk
My subprofile code:

You can get ideas and stuff from it but plz dont steal it all.. it took me a while :P

Code: Select all

<html>
<head>
<LINK REL="stylesheet" HREF="style.css" TYPE="text/css">
</head>
<body bgcolor="#000000">
<font color="#FFFFFF" face="verdana" size="1">
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
var navName = navigator.appName;
if(navName == "Microsoft Internet Explorer")
{
   window.location = "error.php?e=browser";
}
//  End -->
</script>
<?PHP
$maincontent = <<<MC
Welcome to my cool arse subprofile $sn!<br>
I Love You Kate..<br><br>
People who have viewed it:<br>
MC;
if(isset($sn)) {
   $link = "<a href="aim:goim?screenname=$sn&message=Justin+is+the+coolest!">$sn</a>";
   $sn_file = fopen("sns.txt", "a");
   fwrite($sn_file, "$link <br>\n");
   fclose($sn_file);
   echo $maincontent;
   include ("sns.txt");
}
else {
   echo "Don't be an idiot.";
}
?>
</font>
</body>
</html>

Posted: Sat Nov 01, 2003 11:25 am
by westdamron
Thanks, that seems like it should work pretty good. My problem is mostly with writing the code. I can read code pretty well, but can't seem to write it. If anyone knows of a good resource, whether its a book or a website, where i could learn how to WRITE php that would help a lot. thanks.

Posted: Sat Nov 01, 2003 12:57 pm
by d3ad1ysp0rk
writing PHP is just knowing the syntax and the functions, which is also what I have trouble with

oh, and logic :P

i basically learned from http://www.php.net and this forum

Posted: Sat Nov 01, 2003 1:14 pm
by Cruzado_Mainfrm
even if you learn from php.net manuals, it is 10 times better that u read a book in php, PHP Bible for example

Posted: Sat Nov 01, 2003 1:47 pm
by Gen-ik
Cruzado_Mainfrm wrote:even if you learn from php.net manuals, it is 10 times better that u read a book in php, PHP Bible for example
Not true. Books or the Web it doesn't matter. I've learnt all my PHP from the web.

Posted: Sat Nov 01, 2003 1:56 pm
by d3ad1ysp0rk
even if you learn from php.net manuals, it is 10 times better that u read anything else
that on the other hand, is. :P

I find the php.net manuel pretty hard to understand when you're a begginer.. it's nice to look up things with, but it's a very difficult thing to learn from

I just use google to search for different PHP tutorials

Posted: Sat Nov 01, 2003 2:00 pm
by Gen-ik
I was talking about the web in general not just the php.net manual :wink:

Posted: Sat Nov 01, 2003 2:11 pm
by d3ad1ysp0rk
yea i know :P


can anyone give me a list of outputs for "navigator.appName"

I don't really want to download every browser just to add the names of each one to the if statement..

thanks

Posted: Sun Nov 02, 2003 7:19 pm
by m3mn0n
I like books because writers tend to break everything down in terms easily understandable rather than lengthy documentation. Either way is fine though.

[big_search]php introduction[/big_search]