WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. JSiefer
    Member
    Posted 8 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-------

    <phpcode>
    <?php
    $stufftolog = the_title();
    $file = 'titleofpost.php';
    $file = fopen($file, 'a');
    fwrite($file, $stufftolog);
    fclose($file);
    ?>
    </phpcode>

    -----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