Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Aol Instant Messenger and my site

HIVHIV Posts: 2Member
[b][red]This message was edited by HIV at 2003-8-2 14:21:21[/red][/b][hr]
Hi there
I have created a web site using the free software PHP-nuke
I got everything working fine and tweaked it a little...I am not a php programmer, but I know enough c++ to get me along in it

Now, if anybody knows the mesenger service Aol Instant Messenger, there is an option in your profile where you can put %n and it automatically parses it into the screen name of whoever views your profile like...if i put 'hi there %n'

When you view my profile and your screen name is program123 it would say 'hi there program123'

Well, what I want to do is put the link to my site in my profile, but i also want to track which people have been going to my site...I already have a tracker installed but I would like to also store their screen name

the link in my profile would look like this
'http://mysite.com/index.php?n=%n'
and so if you went to my site it would be
http://mysite.com/index.php?n=program123

So, I was wondering if it was possible to do this using phpnuke...
Anybody know any scripts I could insert into my index.php page to store the screen names in a separate file only accessible by me? It seems to me that it would be a pretty simple script, and if nobody replies I am sure I will have to get working on it myself :( but I really dont know where to start...I just dont know enough about php and sql yet...by the way I also have access to mysql, if that works
Thanks for your time

HIV


Comments

  • PsyKadPsyKad Posts: 50Member
    [b][red]This message was edited by PsyKad at 2003-8-15 13:33:12[/red][/b][hr]
    i'm not really sure about the PHP-nuke thing you're asking for. but i might be able to help you out a bit. make a table in your sql account with id(primary key, auto increment, not null), screenname. <---thats all you really want if you just want is the screenname.

    then for your index.php insert this somewhere into your page:
    [code]
    <?php
    $mysql_username = "REPLACEME";
    $mysql_password = "REPLACEME";
    $mysql_host = "REPLACEME";
    $mysql_database = "REPLACEME";

    $mysql_connection = @mysql_connect($mysql_host, $mysql_username, $mysql_password) or die("Could not connect to SQL server");

    mysql_query("INSERT INTO '$mysql_database' SET screenname = '$n'") or die("Could not update table");

    @mysql_close($mysql_connection);
    ?>
    [/code]

    thats not really an effcient way of keeping track of the hits but it gets the job done. anyone care to improve on that or have any other ideas?

    if you want to, you can write a script to sort through the table to create a stats summary. i hope that helps.

    : [b][red]This message was edited by HIV at 2003-8-2 14:21:21[/red][/b][hr]
    : Hi there
    : I have created a web site using the free software PHP-nuke
    : I got everything working fine and tweaked it a little...I am not a php programmer, but I know enough c++ to get me along in it
    :
    : Now, if anybody knows the mesenger service Aol Instant Messenger, there is an option in your profile where you can put %n and it automatically parses it into the screen name of whoever views your profile like...if i put 'hi there %n'
    :
    : When you view my profile and your screen name is program123 it would say 'hi there program123'
    :
    : Well, what I want to do is put the link to my site in my profile, but i also want to track which people have been going to my site...I already have a tracker installed but I would like to also store their screen name
    :
    : the link in my profile would look like this
    : 'http://mysite.com/index.php?n=%n'
    : and so if you went to my site it would be
    : http://mysite.com/index.php?n=program123
    :
    : So, I was wondering if it was possible to do this using phpnuke...
    : Anybody know any scripts I could insert into my index.php page to store the screen names in a separate file only accessible by me? It seems to me that it would be a pretty simple script, and if nobody replies I am sure I will have to get working on it myself :( but I really dont know where to start...I just dont know enough about php and sql yet...by the way I also have access to mysql, if that works
    : Thanks for your time
    :
    : HIV
    :
    :
    :
    -PsyKad

    http://psykad.sytes.net:8000

    [RED]"Old programmers never die, they just don't C as well."[/RED]



  • HIVHIV Posts: 2Member
    Thanks man, i edited that enough and now i can store the name of anyone who comes to my site
Sign In or Register to comment.