HELP!: Log what pages are being viewed by users (1 post)

  1. JSiefer
    Posted 10 years ago #

    Okay, I installed the plugin "PHP Exec" so that I can post PHP on my blog. It works great. So far I have gotten it to post who the user is and what time they access the page I placed this script in, but right now I can't get the name of the page they are viewing to go along with it (and I don't want to have to manually do it for each- what a headache.)

    -----code start-------

    $stufftolog = the_title();
    $file = 'titleofpost.php';
    $file = fopen($file, 'a');
    fwrite($file, $stufftolog);

    -----code end-----

    It runs and outputs the name of the post, but nothing in the file. Any ideas guys?

Topic Closed

This topic has been closed to new replies.

About this Topic